aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-05-17 18:40:45 +0100
committerChristopher Baines <mail@cbaines.net>2021-05-17 18:40:45 +0100
commitf4a87ec059519aefe6158b34049219542d03a22a (patch)
tree2c25445d66b02bb133797950281cb320a4093e95 /sqitch/deploy
parentb8bfdcf622a00264936a952932296bc4f13bdf37 (diff)
downloaddata-service-f4a87ec059519aefe6158b34049219542d03a22a.tar
data-service-f4a87ec059519aefe6158b34049219542d03a22a.tar.gz
Add some indexes
This is from reading the slow query log on data.guix.gnu.org.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/some_indexes.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/sqitch/deploy/some_indexes.sql b/sqitch/deploy/some_indexes.sql
new file mode 100644
index 0000000..d07edbf
--- /dev/null
+++ b/sqitch/deploy/some_indexes.sql
@@ -0,0 +1,13 @@
+-- Deploy guix-data-service:some_indexes to pg
+
+BEGIN;
+
+CREATE INDEX nar_urls_nar_id ON nar_urls (nar_id);
+
+CREATE INDEX load_new_guix_revision_jobs_unprocessed
+ ON load_new_guix_revision_jobs (id) WHERE succeeded_at IS NULL;
+
+CREATE INDEX guix_revision_lint_warnings_guix_revision_id
+ ON guix_revision_lint_warnings (guix_revision_id);
+
+COMMIT;