From ff01144e871b7eaa3b91a3054fa57c3dbbb19702 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 26 Dec 2019 09:28:20 +0000 Subject: Create an index for the hash component of derivation filenames This is to aid rendering of narinfo files. They're requested with the path /HASH.narinfo, so to quickly find the relevant derivation, this index can be used. --- sqitch/deploy/derivations_hash_index.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sqitch/deploy/derivations_hash_index.sql (limited to 'sqitch/deploy') diff --git a/sqitch/deploy/derivations_hash_index.sql b/sqitch/deploy/derivations_hash_index.sql new file mode 100644 index 0000000..869ff0a --- /dev/null +++ b/sqitch/deploy/derivations_hash_index.sql @@ -0,0 +1,7 @@ +-- Deploy guix-data-service:derivations_hash_index to pg + +BEGIN; + +CREATE INDEX derivations_hash ON derivations (substring(file_name from 12 for 32)); + +COMMIT; -- cgit v1.2.3