Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: frontend/migrations/064_add_jobs_and_tests_time_indices.py

Issue 4823005: Merge remote branch 'cros/upstream' into tempbranch (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: patch Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frontend/afe/rpc_utils.py ('k') | global_config.ini » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+"""
« no previous file with comments | « frontend/afe/rpc_utils.py ('k') | global_config.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698