aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-29 17:55:04 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-29 17:55:04 +0000
commit82b797ee9869ebe24f7dbbcc56c3d500e75dc2d3 (patch)
treec3bca8a2b7f1606b407009c0e349aeba01f3c83b /sqitch/deploy
parent7e7cc1c8f17723bd909f84be11326cc1d47223d0 (diff)
downloaddata-service-82b797ee9869ebe24f7dbbcc56c3d500e75dc2d3.tar
data-service-82b797ee9869ebe24f7dbbcc56c3d500e75dc2d3.tar.gz
Create an index on the hash component of the store path
For derivation_source_files.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/derivation_source_files_store_path_hash_index.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/sqitch/deploy/derivation_source_files_store_path_hash_index.sql b/sqitch/deploy/derivation_source_files_store_path_hash_index.sql
new file mode 100644
index 0000000..4c1f3bb
--- /dev/null
+++ b/sqitch/deploy/derivation_source_files_store_path_hash_index.sql
@@ -0,0 +1,8 @@
+-- Deploy guix-data-service:derivation_source_files_store_path_hash_index to pg
+
+BEGIN;
+
+CREATE INDEX derivation_source_files_hash
+ ON derivation_source_files (substring(store_path from 12 for 32));
+
+COMMIT;