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.
This commit is contained in:
parent
a8d58e0541
commit
ff01144e87
|
@ -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;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert guix-data-service:derivations_hash_index from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP INDEX derivations_hash;
|
||||
|
||||
COMMIT;
|
|
@ -38,3 +38,4 @@ sort_out_duplicate_builds 2019-12-05T12:43:53Z <chris@phact> # Sort out duplic
|
|||
add_some_database_indexes 2019-12-05T15:53:04Z Christopher Baines <mail@cbaines.net> # Add some indexes
|
||||
derivation_output_sets 2019-12-05T23:19:05Z Christopher Baines <mail@cbaines.net> # Describe the sets of derivation outputs
|
||||
builds_add_derivation_output_details_set_id 2019-12-07T18:25:38Z Christopher Baines <mail@cbaines.net> # Add a derivation_output_details_set_id column to builds
|
||||
derivations_hash_index 2019-12-24T22:54:19Z Christopher Baines <mail@cbaines.net> # Add index on derivations for the hash component of the filename
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:derivations_hash_index on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
Loading…
Reference in New Issue