diff options
author | Christopher Baines <mail@cbaines.net> | 2021-05-17 18:40:45 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-05-17 18:40:45 +0100 |
commit | f4a87ec059519aefe6158b34049219542d03a22a (patch) | |
tree | 2c25445d66b02bb133797950281cb320a4093e95 /sqitch/deploy/some_indexes.sql | |
parent | b8bfdcf622a00264936a952932296bc4f13bdf37 (diff) | |
download | data-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/some_indexes.sql')
-rw-r--r-- | sqitch/deploy/some_indexes.sql | 13 |
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; |