guix-commits
[Top][All Lists]
Advanced

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

branch master updated: Add index to speed up deleting revisions


From: Christopher Baines
Subject: branch master updated: Add index to speed up deleting revisions
Date: Tue, 27 Oct 2020 13:08:44 -0400

This is an automated email from the git hooks/post-receive script.

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

The following commit(s) were added to refs/heads/master by this push:
     new 67f1ace  Add index to speed up deleting revisions
67f1ace is described below

commit 67f1ace9eb37175a2d33ecebd0de9a0a9680fb4e
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Tue Oct 27 16:59:09 2020 +0000

    Add index to speed up deleting revisions
    
    This is necessary to quickly delete entries from package_derivaitons.
---
 ...revision_package_derivations_add_package_derivation_index.sql | 9 +++++++++
 ...revision_package_derivations_add_package_derivation_index.sql | 7 +++++++
 sqitch/sqitch.plan                                               | 1 +
 ...revision_package_derivations_add_package_derivation_index.sql | 7 +++++++
 4 files changed, 24 insertions(+)

diff --git 
a/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql
 
b/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql
new file mode 100644
index 0000000..9380bbd
--- /dev/null
+++ 
b/sqitch/deploy/guix_revision_package_derivations_add_package_derivation_index.sql
@@ -0,0 +1,9 @@
+-- Deploy 
guix-data-service:guix_revision_package_derivations_add_package_derivation_index
 to pg
+
+BEGIN;
+
+CREATE INDEX guix_revision_package_derivations_package_derivation_id_idx
+  ON guix_revision_package_derivations (package_derivation_id)
+  WITH (fillfactor='100');
+
+COMMIT;
diff --git 
a/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql
 
b/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql
new file mode 100644
index 0000000..97ba53d
--- /dev/null
+++ 
b/sqitch/revert/guix_revision_package_derivations_add_package_derivation_index.sql
@@ -0,0 +1,7 @@
+-- Revert 
guix-data-service:guix_revision_package_derivations_add_package_derivation_index
 from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 5df6d90..85363da 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -75,3 +75,4 @@ add_derivation_sources_derivation_source_file_id_index 
2020-10-02T19:11:59Z Chri
 git_repositories_add_fetch_with_authentication_field 2020-10-07T17:31:20Z 
Christopher Baines <mail@cbaines.net> # Add 
git_repositories.fetch_with_authentication
 create_latest_build_status 2020-10-13T17:22:39Z Christopher Baines 
<mail@cbaines.net> # Create the latest_build_status table
 regenerate_latest_build_status 2020-10-21T18:39:03Z Christopher Baines 
<mail@cbaines.net> # Regenerate the latest_build_status table
+guix_revision_package_derivations_add_package_derivation_index 
2020-10-27T16:58:08Z Christopher Baines <mail@cbaines.net> # Add index for 
guix_revision_package_derivations.package_derivation_id
diff --git 
a/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql
 
b/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql
new file mode 100644
index 0000000..6252fcb
--- /dev/null
+++ 
b/sqitch/verify/guix_revision_package_derivations_add_package_derivation_index.sql
@@ -0,0 +1,7 @@
+-- Verify 
guix-data-service:guix_revision_package_derivations_add_package_derivation_index
 on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;



reply via email to

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