aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-29 18:02:06 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-29 18:02:06 +0100
commit5f01bb9edaac3649998c90fe400f4cd98c668d95 (patch)
tree2cf9d08c8389b3060cea95cd34b88c2f52accfa9 /sqitch/sqlite
parent774971e06ce6b7ac3fe746683aad16463bf1b3ee (diff)
downloadbuild-coordinator-5f01bb9edaac3649998c90fe400f4cd98c668d95.tar
build-coordinator-5f01bb9edaac3649998c90fe400f4cd98c668d95.tar.gz
Add a couple of indexes that should speed up allocating builds
Diffstat (limited to 'sqitch/sqlite')
-rw-r--r--sqitch/sqlite/deploy/allocator_related_indexes.sql10
-rw-r--r--sqitch/sqlite/revert/allocator_related_indexes.sql7
-rw-r--r--sqitch/sqlite/verify/allocator_related_indexes.sql7
3 files changed, 24 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/allocator_related_indexes.sql b/sqitch/sqlite/deploy/allocator_related_indexes.sql
new file mode 100644
index 0000000..0019833
--- /dev/null
+++ b/sqitch/sqlite/deploy/allocator_related_indexes.sql
@@ -0,0 +1,10 @@
+-- Deploy guix-build-coordinator:allocator_related_indexes to sqlite
+
+BEGIN;
+
+CREATE INDEX builds_derivation_name_idx ON builds (derivation_name);
+
+CREATE INDEX setup_failure_missing_inputs_setup_failure_id_idx
+ ON setup_failure_missing_inputs (setup_failure_id);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/allocator_related_indexes.sql b/sqitch/sqlite/revert/allocator_related_indexes.sql
new file mode 100644
index 0000000..4444272
--- /dev/null
+++ b/sqitch/sqlite/revert/allocator_related_indexes.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:allocator_related_indexes from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/allocator_related_indexes.sql b/sqitch/sqlite/verify/allocator_related_indexes.sql
new file mode 100644
index 0000000..22320fe
--- /dev/null
+++ b/sqitch/sqlite/verify/allocator_related_indexes.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:allocator_related_indexes on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;