diff options
author | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-10-18 21:27:28 +0000 |
---|---|---|
committer | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-10-18 21:27:28 +0000 |
commit | 3a31ddecc1b9b4f367f7408ccff519a0c843a019 (patch) | |
tree | ca64e8d13e4405293a0d7eb0a5b3141bd54ed7d3 /frontend | |
parent | 884338d20595cc165d2457afe36862d307c6ef36 (diff) |
Add indices on the tko_tests.start_time and afe_jobs.created_on
Add indices on the tko_tests.start_time and afe_jobs.created_on
columns. We query on these to process data for generating custom
dashboards.
Signed-off-by: Gregory Smith <gps@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@4863 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/migrations/064_add_jobs_and_tests_time_indices.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 00000000..3508bba3 --- /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; +""" |