From bd47a03c220bdd9ad66088075f66b61d291aeaa8 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 29 Sep 2019 12:04:57 +0100 Subject: Add migration to create an index on load_new_guix_revision_job_events To speed up the rendering of the index page. --- .../deploy/index_on_load_new_guix_revision_job_events_job_id.sql | 7 +++++++ .../revert/index_on_load_new_guix_revision_job_events_job_id.sql | 7 +++++++ sqitch/sqitch.plan | 1 + .../verify/index_on_load_new_guix_revision_job_events_job_id.sql | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100644 sqitch/deploy/index_on_load_new_guix_revision_job_events_job_id.sql create mode 100644 sqitch/revert/index_on_load_new_guix_revision_job_events_job_id.sql create mode 100644 sqitch/verify/index_on_load_new_guix_revision_job_events_job_id.sql diff --git a/sqitch/deploy/index_on_load_new_guix_revision_job_events_job_id.sql b/sqitch/deploy/index_on_load_new_guix_revision_job_events_job_id.sql new file mode 100644 index 0000000..83c7d92 --- /dev/null +++ b/sqitch/deploy/index_on_load_new_guix_revision_job_events_job_id.sql @@ -0,0 +1,7 @@ +-- Deploy guix-data-service:index_on_load_new_guix_revision_job_events_job_id to pg + +BEGIN; + +CREATE INDEX load_new_guix_revision_job_events_job_id ON load_new_guix_revision_job_events USING btree (job_id); + +COMMIT; diff --git a/sqitch/revert/index_on_load_new_guix_revision_job_events_job_id.sql b/sqitch/revert/index_on_load_new_guix_revision_job_events_job_id.sql new file mode 100644 index 0000000..9e85447 --- /dev/null +++ b/sqitch/revert/index_on_load_new_guix_revision_job_events_job_id.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:index_on_load_new_guix_revision_job_events_job_id from pg + +BEGIN; + +DROP INDEX load_new_guix_revision_job_events_job_id; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 8c0beec..ff17ebd 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -21,3 +21,4 @@ remove_duplicate_load_new_guix_revision_jobs 2019-08-05T19:06:36Z Christopher Ba lint_warnings 2019-08-18T17:10:12Z Christopher Baines # Store lint warnings guix_revision_lint_checkers 2019-09-01T12:17:38Z chris # Associate lint_checkers to guix_revisions package_versions_by_guix_revision_range 2019-09-26T20:23:15Z Christopher Baines # Add package_versions_by_guix_revision_range table +index_on_load_new_guix_revision_job_events_job_id 2019-09-29T10:39:04Z Christopher Baines # Add index on load_new_guix_revision_job_events.job_id diff --git a/sqitch/verify/index_on_load_new_guix_revision_job_events_job_id.sql b/sqitch/verify/index_on_load_new_guix_revision_job_events_job_id.sql new file mode 100644 index 0000000..56d84a4 --- /dev/null +++ b/sqitch/verify/index_on_load_new_guix_revision_job_events_job_id.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:index_on_load_new_guix_revision_job_events_job_id on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3