guix-data-service/sqitch/deploy/derivations_hash_index.sql
Christopher Baines ff01144e87 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.
2019-12-26 09:28:20 +00:00

7 lines
159 B
PL/PgSQL

-- Deploy guix-data-service:derivations_hash_index to pg
BEGIN;
CREATE INDEX derivations_hash ON derivations (substring(file_name from 12 for 32));
COMMIT;