aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-10-02 20:13:28 +0100
committerChristopher Baines <mail@cbaines.net>2020-10-02 20:15:23 +0100
commite2a7705d3d01c992c0dfed6363388246b5bd69dc (patch)
tree953c0c1d5629733ca56969b3268c3f5cba2374d6 /sqitch/deploy
parent71afa939816a3f7d53cce91d00fc1110125f18fe (diff)
downloaddata-service-e2a7705d3d01c992c0dfed6363388246b5bd69dc.tar
data-service-e2a7705d3d01c992c0dfed6363388246b5bd69dc.tar.gz
Add an index for derivation_sources.derivation_source_file_id
As this speeds up deleting derivation_source_files.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/add_derivation_sources_derivation_source_file_id_index.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/sqitch/deploy/add_derivation_sources_derivation_source_file_id_index.sql b/sqitch/deploy/add_derivation_sources_derivation_source_file_id_index.sql
new file mode 100644
index 0000000..2665f02
--- /dev/null
+++ b/sqitch/deploy/add_derivation_sources_derivation_source_file_id_index.sql
@@ -0,0 +1,8 @@
+-- Deploy guix-data-service:add_derivation_sources_derivation_source_file_id_index to pg
+
+BEGIN;
+
+CREATE INDEX derivation_sources_derivation_source_file_id_idx
+ON derivation_sources (derivation_source_file_id);
+
+COMMIT;