Add index on derivation_outputs id and derivation_id fields

This might help with doing recursive queries on the derivations graph.
This commit is contained in:
Christopher Baines 2022-11-12 10:42:04 +00:00
parent fb9d99a076
commit fc5f562731
4 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,7 @@
-- Deploy guix-data-service:derivation_outputs_id_and_derivation_id_idx to pg
BEGIN;
CREATE INDEX derivation_outputs_id_and_derivation_id ON derivation_outputs (id, derivation_id);
COMMIT;

View file

@ -0,0 +1,7 @@
-- Revert guix-data-service:derivation_outputs_id_and_derivation_id_idx from pg
BEGIN;
-- XXX Add DDLs here.
COMMIT;

View file

@ -91,3 +91,4 @@ git_repositories_query_substitutes 2022-09-09T11:35:16Z Chris <chris@felis> # Ad
package_derivations_id_package_id_idx 2022-09-14T09:24:30Z Chris <chris@felis> # Add index on package_derivations id and package_id package_derivations_id_package_id_idx 2022-09-14T09:24:30Z Chris <chris@felis> # Add index on package_derivations id and package_id
blocked_builds 2022-11-07T11:27:28Z Chris <chris@felis> # Add blocked_builds blocked_builds 2022-11-07T11:27:28Z Chris <chris@felis> # Add blocked_builds
package_derivations_extended_statistics 2022-11-12T10:40:18Z Chris <chris@felis> # Add extended statistics on package_derivations package_derivations_extended_statistics 2022-11-12T10:40:18Z Chris <chris@felis> # Add extended statistics on package_derivations
derivation_outputs_id_and_derivation_id_idx 2022-11-12T10:41:42Z Chris <chris@felis> # Add index on derivation_outputs id and derivation_id

View file

@ -0,0 +1,7 @@
-- Verify guix-data-service:derivation_outputs_id_and_derivation_id_idx on pg
BEGIN;
-- XXX Add verifications here.
ROLLBACK;