diff options
author | Christopher Baines <mail@cbaines.net> | 2020-03-25 19:11:03 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-03-25 19:11:03 +0000 |
commit | 0c4e6a2fe49d13a65f836a2b8a5dade720aa7e6b (patch) | |
tree | bcab245afc982ce088771c2722c5aee1295ca615 | |
parent | 8af7130239877bc8c24dd0c44ccd52d15d1eb1d0 (diff) | |
download | data-service-0c4e6a2fe49d13a65f836a2b8a5dade720aa7e6b.tar data-service-0c4e6a2fe49d13a65f836a2b8a5dade720aa7e6b.tar.gz |
Create an index on narinfo_fetch_records
This greatly improves the performance of the derivation-outputs page.
-rw-r--r-- | sqitch/deploy/create_narinfo_fetch_records_index.sql | 8 | ||||
-rw-r--r-- | sqitch/revert/create_narinfo_fetch_records_index.sql | 7 | ||||
-rw-r--r-- | sqitch/sqitch.plan | 1 | ||||
-rw-r--r-- | sqitch/verify/create_narinfo_fetch_records_index.sql | 7 |
4 files changed, 23 insertions, 0 deletions
diff --git a/sqitch/deploy/create_narinfo_fetch_records_index.sql b/sqitch/deploy/create_narinfo_fetch_records_index.sql new file mode 100644 index 0000000..c3547d5 --- /dev/null +++ b/sqitch/deploy/create_narinfo_fetch_records_index.sql @@ -0,0 +1,8 @@ +-- Deploy guix-data-service:create_narinfo_fetch_records_index to pg + +BEGIN; + +CREATE INDEX narinfo_fetch_records_narinfo_signature_data_id ON + narinfo_fetch_records (narinfo_signature_data_id); + +COMMIT; diff --git a/sqitch/revert/create_narinfo_fetch_records_index.sql b/sqitch/revert/create_narinfo_fetch_records_index.sql new file mode 100644 index 0000000..2da20bf --- /dev/null +++ b/sqitch/revert/create_narinfo_fetch_records_index.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:create_narinfo_fetch_records_index from pg + +BEGIN; + +DROP INDEX narinfo_fetch_records_narinfo_signature_data_id; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index d770077..e0c55c7 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -54,3 +54,4 @@ update_build_servers_build_config 2020-02-13T20:07:19Z Christopher Baines <mail@ make_some_constraints_deferrable 2020-02-16T10:54:22Z Christopher Baines <mail@cbaines.net> # Make some constraints deferrable guix_revision_system_test_derivations_add_system 2020-03-19T21:30:33Z Christopher Baines <mail@cbaines.net> # Add a system column to the guix_revision_system_test_derivations table drop_package_versions_by_guix_revision_range 2020-03-24T20:40:38Z Christopher Baines <mail@cbaines.net> # Drop package_versions_by_guix_revision_range +create_narinfo_fetch_records_index 2020-03-25T19:07:28Z Christopher Baines <mail@cbaines.net> # Create an index on narinfo_fetch_records diff --git a/sqitch/verify/create_narinfo_fetch_records_index.sql b/sqitch/verify/create_narinfo_fetch_records_index.sql new file mode 100644 index 0000000..4835797 --- /dev/null +++ b/sqitch/verify/create_narinfo_fetch_records_index.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:create_narinfo_fetch_records_index on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |