From 5f01bb9edaac3649998c90fe400f4cd98c668d95 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 29 Apr 2020 18:02:06 +0100 Subject: Add a couple of indexes that should speed up allocating builds --- sqitch/pg/deploy/allocator_related_indexes.sql | 7 +++++++ sqitch/pg/revert/allocator_related_indexes.sql | 7 +++++++ sqitch/pg/verify/allocator_related_indexes.sql | 7 +++++++ sqitch/sqitch.plan | 1 + sqitch/sqlite/deploy/allocator_related_indexes.sql | 10 ++++++++++ sqitch/sqlite/revert/allocator_related_indexes.sql | 7 +++++++ sqitch/sqlite/verify/allocator_related_indexes.sql | 7 +++++++ 7 files changed, 46 insertions(+) create mode 100644 sqitch/pg/deploy/allocator_related_indexes.sql create mode 100644 sqitch/pg/revert/allocator_related_indexes.sql create mode 100644 sqitch/pg/verify/allocator_related_indexes.sql create mode 100644 sqitch/sqlite/deploy/allocator_related_indexes.sql create mode 100644 sqitch/sqlite/revert/allocator_related_indexes.sql create mode 100644 sqitch/sqlite/verify/allocator_related_indexes.sql diff --git a/sqitch/pg/deploy/allocator_related_indexes.sql b/sqitch/pg/deploy/allocator_related_indexes.sql new file mode 100644 index 0000000..6e4f902 --- /dev/null +++ b/sqitch/pg/deploy/allocator_related_indexes.sql @@ -0,0 +1,7 @@ +-- Deploy guix-build-coordinator:allocator_related_indexes to pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/pg/revert/allocator_related_indexes.sql b/sqitch/pg/revert/allocator_related_indexes.sql new file mode 100644 index 0000000..fead415 --- /dev/null +++ b/sqitch/pg/revert/allocator_related_indexes.sql @@ -0,0 +1,7 @@ +-- Revert guix-build-coordinator:allocator_related_indexes from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/pg/verify/allocator_related_indexes.sql b/sqitch/pg/verify/allocator_related_indexes.sql new file mode 100644 index 0000000..d75e9e0 --- /dev/null +++ b/sqitch/pg/verify/allocator_related_indexes.sql @@ -0,0 +1,7 @@ +-- Verify guix-build-coordinator:allocator_related_indexes on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 6f49810..565d142 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -10,3 +10,4 @@ build_results 2020-04-12T19:59:27Z Christopher Baines # Creat setup_failures 2020-04-13T13:05:29Z Christopher Baines # Create table for storing setup_failures output_metadata 2020-04-23T14:26:15Z Christopher Baines # Create table for storing output metadata derivation_outputs_output_index 2020-04-28T17:49:19Z Christopher Baines # Add an index on derivation_outputs.output +allocator_related_indexes 2020-04-29T16:59:14Z Christopher Baines # Add a few indexes that should speed up build allocation 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; -- cgit v1.2.3