diff options
author | Christopher Baines <mail@cbaines.net> | 2020-10-27 16:59:09 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-10-27 16:59:09 +0000 |
commit | 67f1ace9eb37175a2d33ecebd0de9a0a9680fb4e (patch) | |
tree | 45a6ff87ee1d50c73a3795e973cc14116cbaa69c /sqitch | |
parent | 6a7f6b5a0e939cab96b90f058accc59aa838ec4f (diff) | |
download | data-service-67f1ace9eb37175a2d33ecebd0de9a0a9680fb4e.tar data-service-67f1ace9eb37175a2d33ecebd0de9a0a9680fb4e.tar.gz |
Add index to speed up deleting revisions
This is necessary to quickly delete entries from package_derivaitons.
Diffstat (limited to 'sqitch')
4 files changed, 24 insertions, 0 deletions
diff --git a/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql b/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql new file mode 100644 index 0000000..9380bbd --- /dev/null +++ b/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql @@ -0,0 +1,9 @@ +-- Deploy guix-data-service:guix_revision_package_derivations_add_package_derivation_index to pg + +BEGIN; + +CREATE INDEX guix_revision_package_derivations_package_derivation_id_idx + ON guix_revision_package_derivations (package_derivation_id) + WITH (fillfactor='100'); + +COMMIT; diff --git a/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql b/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql new file mode 100644 index 0000000..97ba53d --- /dev/null +++ b/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:guix_revision_package_derivations_add_package_derivation_index from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 5df6d90..85363da 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -75,3 +75,4 @@ add_derivation_sources_derivation_source_file_id_index 2020-10-02T19:11:59Z Chri git_repositories_add_fetch_with_authentication_field 2020-10-07T17:31:20Z Christopher Baines <mail@cbaines.net> # Add git_repositories.fetch_with_authentication create_latest_build_status 2020-10-13T17:22:39Z Christopher Baines <mail@cbaines.net> # Create the latest_build_status table regenerate_latest_build_status 2020-10-21T18:39:03Z Christopher Baines <mail@cbaines.net> # Regenerate the latest_build_status table +guix_revision_package_derivations_add_package_derivation_index 2020-10-27T16:58:08Z Christopher Baines <mail@cbaines.net> # Add index for guix_revision_package_derivations.package_derivation_id diff --git a/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql b/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql new file mode 100644 index 0000000..6252fcb --- /dev/null +++ b/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:guix_revision_package_derivations_add_package_derivation_index on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |