From e3062abf33f9887656ce4bd99f34317694533d50 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 14 Sep 2022 10:26:03 +0100 Subject: Speed up finding the locales for a revision --- sqitch/deploy/package_derivations_id_package_id_idx.sql | 7 +++++++ sqitch/revert/package_derivations_id_package_id_idx.sql | 7 +++++++ sqitch/sqitch.plan | 1 + sqitch/verify/package_derivations_id_package_id_idx.sql | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100644 sqitch/deploy/package_derivations_id_package_id_idx.sql create mode 100644 sqitch/revert/package_derivations_id_package_id_idx.sql create mode 100644 sqitch/verify/package_derivations_id_package_id_idx.sql (limited to 'sqitch') diff --git a/sqitch/deploy/package_derivations_id_package_id_idx.sql b/sqitch/deploy/package_derivations_id_package_id_idx.sql new file mode 100644 index 0000000..ff05c4b --- /dev/null +++ b/sqitch/deploy/package_derivations_id_package_id_idx.sql @@ -0,0 +1,7 @@ +-- Deploy guix-data-service:package_derivations_id_package_id_idx to pg + +BEGIN; + +CREATE INDEX package_derivations_id_package_id_idx ON package_derivations (id, package_id) WITH (fillfactor='100'); + +COMMIT; diff --git a/sqitch/revert/package_derivations_id_package_id_idx.sql b/sqitch/revert/package_derivations_id_package_id_idx.sql new file mode 100644 index 0000000..4378119 --- /dev/null +++ b/sqitch/revert/package_derivations_id_package_id_idx.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:package_derivations_id_package_id_idx from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 5b7408b..a33137b 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -88,3 +88,4 @@ partition_package_derivations_by_guix_revision_range 2022-05-23T18:20:37Z Chris package_range_index 2022-06-17T10:39:31Z Chris # Add index on package_derivations_by_guix_revision_range.package_name fix_git_commits_duplicates 2022-06-17T10:39:50Z Chris # Fix git_commits duplicates git_repositories_query_substitutes 2022-09-09T11:35:16Z Chris # Add git_repositories.query_substitutes +package_derivations_id_package_id_idx 2022-09-14T09:24:30Z Chris # Add index on package_derivations id and package_id diff --git a/sqitch/verify/package_derivations_id_package_id_idx.sql b/sqitch/verify/package_derivations_id_package_id_idx.sql new file mode 100644 index 0000000..cf5c246 --- /dev/null +++ b/sqitch/verify/package_derivations_id_package_id_idx.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:package_derivations_id_package_id_idx on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3