aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-10-27 16:59:09 +0000
committerChristopher Baines <mail@cbaines.net>2020-10-27 16:59:09 +0000
commit67f1ace9eb37175a2d33ecebd0de9a0a9680fb4e (patch)
tree45a6ff87ee1d50c73a3795e973cc14116cbaa69c /sqitch/deploy
parent6a7f6b5a0e939cab96b90f058accc59aa838ec4f (diff)
downloaddata-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/deploy')
-rw-r--r--sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql9
1 files changed, 9 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;