guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: Add some indexes


From: Christopher Baines
Subject: 02/02: Add some indexes
Date: Mon, 17 May 2021 13:41:53 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit f4a87ec059519aefe6158b34049219542d03a22a
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon May 17 18:40:45 2021 +0100

    Add some indexes
    
    This is from reading the slow query log on data.guix.gnu.org.
---
 sqitch/deploy/some_indexes.sql | 13 +++++++++++++
 sqitch/revert/some_indexes.sql |  7 +++++++
 sqitch/sqitch.plan             |  1 +
 sqitch/verify/some_indexes.sql |  7 +++++++
 4 files changed, 28 insertions(+)

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;
diff --git a/sqitch/revert/some_indexes.sql b/sqitch/revert/some_indexes.sql
new file mode 100644
index 0000000..7756dea
--- /dev/null
+++ b/sqitch/revert/some_indexes.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:some_indexes from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 76d574b..4b969ad 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -79,3 +79,4 @@ 
guix_revision_package_derivations_add_package_derivation_index 2020-10-27T16:58:
 increase_derivation_inputs_statistics_targets 2020-12-27T10:34:58Z Christopher 
Baines <mail@cbaines.net> # Increase stats targets on derivation_inputs fields
 remove_guix_revisions_store_path 2021-02-02T20:06:18Z Christopher Baines 
<mail@cbaines.net> # Drop guix_revisions.store_path
 systems_table 2021-04-22T08:12:10Z Christopher Baines <mail@cbaines.net> # Add 
a systems table
+some_indexes 2021-05-17T17:36:38Z Christopher Baines <mail@cbaines.net> # Add 
some indexes
diff --git a/sqitch/verify/some_indexes.sql b/sqitch/verify/some_indexes.sql
new file mode 100644
index 0000000..617411e
--- /dev/null
+++ b/sqitch/verify/some_indexes.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:some_indexes on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]