Index: frontend/migrations/064_add_jobs_and_tests_time_indices.py |
diff --git a/frontend/migrations/064_add_jobs_and_tests_time_indices.py b/frontend/migrations/064_add_jobs_and_tests_time_indices.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3508bba36708a13566ceefc3871a44cbaac00999 |
--- /dev/null |
+++ b/frontend/migrations/064_add_jobs_and_tests_time_indices.py |
@@ -0,0 +1,10 @@ |
+# These indices speed up date-range queries often used in making dashboards. |
+UP_SQL = """ |
+alter table tko_tests add index started_time (started_time); |
+alter table afe_jobs add index created_on (created_on); |
+""" |
+ |
+DOWN_SQL = """ |
+drop index started_time on tko_tests; |
+drop index created_on on afe_jobs; |
+""" |
truty
2010/11/15 19:32:09
This will make our db bigger and this db upgrade w
|