From a6f239fb8a51fc9bd1bdca1d2a0e99f0a6bf7f3c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 5 Mar 2023 10:21:14 +0000 Subject: Add an extra index on blocked_builds I think this might help with queries that don't use the build_server_id. --- ..._blocked_builds_blocked_derivation_output_details_set_id_2.sql | 8 ++++++++ ..._blocked_builds_blocked_derivation_output_details_set_id_2.sql | 7 +++++++ sqitch/sqitch.plan | 1 + ..._blocked_builds_blocked_derivation_output_details_set_id_2.sql | 7 +++++++ 4 files changed, 23 insertions(+) create mode 100644 sqitch/deploy/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql create mode 100644 sqitch/revert/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql create mode 100644 sqitch/verify/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql (limited to 'sqitch') diff --git a/sqitch/deploy/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql b/sqitch/deploy/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql new file mode 100644 index 0000000..9ad850f --- /dev/null +++ b/sqitch/deploy/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql @@ -0,0 +1,8 @@ +-- Deploy guix-data-service:blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2 to pg + +BEGIN; + +CREATE INDEX blocked_builds_blocked_derivation_output_details_set_id_2 + ON blocked_builds (blocked_derivation_output_details_set_id); + +COMMIT; diff --git a/sqitch/revert/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql b/sqitch/revert/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql new file mode 100644 index 0000000..9be1efd --- /dev/null +++ b/sqitch/revert/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2 from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index d331920..64b2189 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -92,3 +92,4 @@ package_derivations_id_package_id_idx 2022-09-14T09:24:30Z Chris # blocked_builds 2022-11-07T11:27:28Z Chris # Add blocked_builds package_derivations_extended_statistics 2022-11-12T10:40:18Z Chris # Add extended statistics on package_derivations derivation_outputs_id_and_derivation_id_idx 2022-11-12T10:41:42Z Chris # Add index on derivation_outputs id and derivation_id +blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2 2023-03-05T10:19:53Z Chris # Add index on blocked_builds_blocked_derivation_output_details_set_id diff --git a/sqitch/verify/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql b/sqitch/verify/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql new file mode 100644 index 0000000..c7334f0 --- /dev/null +++ b/sqitch/verify/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2 on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3