aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-05 10:21:14 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-05 10:21:14 +0000
commita6f239fb8a51fc9bd1bdca1d2a0e99f0a6bf7f3c (patch)
tree4344d5b49a9a2759a2de563e8b0ec026b6577ff4 /sqitch
parent7e7cd3f5a95341179e0db0f7c8c825f6131c4bde (diff)
downloaddata-service-a6f239fb8a51fc9bd1bdca1d2a0e99f0a6bf7f3c.tar
data-service-a6f239fb8a51fc9bd1bdca1d2a0e99f0a6bf7f3c.tar.gz
Add an extra index on blocked_builds
I think this might help with queries that don't use the build_server_id.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql8
-rw-r--r--sqitch/revert/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2.sql7
4 files changed, 23 insertions, 0 deletions
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 <chris@felis> #
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
derivation_outputs_id_and_derivation_id_idx 2022-11-12T10:41:42Z Chris <chris@felis> # 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 <chris@felis> # 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;