aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-11-24 16:31:30 +0000
committerChristopher Baines <mail@cbaines.net>2023-11-24 16:31:30 +0000
commit956c87fc02587aa6323ec6d0df1ec0bcf9977121 (patch)
tree8bf77c3d168825d722aace0991ff67fd94e7a23c /sqitch/sqlite
parent78df0b3a9f4f27df8341da36d4dfa8e49dfad900 (diff)
downloadbuild-coordinator-956c87fc02587aa6323ec6d0df1ec0bcf9977121.tar
build-coordinator-956c87fc02587aa6323ec6d0df1ec0bcf9977121.tar.gz
Create index on build_starts
As querying it is slow.
Diffstat (limited to 'sqitch/sqlite')
-rw-r--r--sqitch/sqlite/deploy/build_starts_index.sql7
-rw-r--r--sqitch/sqlite/revert/build_starts_index.sql7
-rw-r--r--sqitch/sqlite/verify/build_starts_index.sql7
3 files changed, 21 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/build_starts_index.sql b/sqitch/sqlite/deploy/build_starts_index.sql
new file mode 100644
index 0000000..1d4cf2d
--- /dev/null
+++ b/sqitch/sqlite/deploy/build_starts_index.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:build_starts_index to sqlite
+
+BEGIN;
+
+CREATE INDEX build_starts_build_id_idx ON build_starts (build_id);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/build_starts_index.sql b/sqitch/sqlite/revert/build_starts_index.sql
new file mode 100644
index 0000000..6165710
--- /dev/null
+++ b/sqitch/sqlite/revert/build_starts_index.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:build_starts_index from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/build_starts_index.sql b/sqitch/sqlite/verify/build_starts_index.sql
new file mode 100644
index 0000000..6e99da5
--- /dev/null
+++ b/sqitch/sqlite/verify/build_starts_index.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:build_starts_index on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;