Add an index for derivation_sources.derivation_source_file_id

As this speeds up deleting derivation_source_files.
This commit is contained in:
Christopher Baines 2020-10-02 20:13:28 +01:00
parent 71afa93981
commit e2a7705d3d
4 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,8 @@
-- Deploy guix-data-service:add_derivation_sources_derivation_source_file_id_index to pg
BEGIN;
CREATE INDEX derivation_sources_derivation_source_file_id_idx
ON derivation_sources (derivation_source_file_id);
COMMIT;

View file

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

View file

@ -71,3 +71,4 @@ change_package_descriptions_index 2020-08-23T11:56:00Z Christopher Baines <mail@
change_locale_values 2020-09-26T10:20:22Z Christopher Baines <mail@cbaines.net> # Change locale values
change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines <mail@cbaines.net> # Change autovacuum config
change_derivation_source_file_nars_constraint 2020-10-02T17:12:58Z Christopher Baines <mail@cbaines.net> # Change derivation source file nars constraint
add_derivation_sources_derivation_source_file_id_index 2020-10-02T19:11:59Z Christopher Baines <mail@cbaines.net> # Add derivation_sources.derivation_source_file_id index

View file

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