aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCanan Talayhan <canan.t.talayhan@gmail.com>2021-05-27 22:59:13 +0300
committerChristopher Baines <mail@cbaines.net>2021-05-27 21:26:56 +0100
commit9c1b989d203e49ad99eb69514b3ff1981acd9e5a (patch)
tree809aaf2f1b96c7709e443903c7aae4843b9628ed
parent854f2cbba94a6a0bcb7a0bd1ee9d2706b8b6f58a (diff)
downloaddata-service-9c1b989d203e49ad99eb69514b3ff1981acd9e5a.tar
data-service-9c1b989d203e49ad99eb69514b3ff1981acd9e5a.tar.gz
Add index for package_metadata
This index speeds up inserting new entries to the package_metadata table. Signed-off-by: Christopher Baines <mail@cbaines.net>
-rw-r--r--sqitch/deploy/package_metadata_location_id_index.sql7
-rw-r--r--sqitch/revert/package_metadata_location_id_index.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/package_metadata_location_id_index.sql7
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/package_metadata_location_id_index.sql b/sqitch/deploy/package_metadata_location_id_index.sql
new file mode 100644
index 0000000..3fa2aed
--- /dev/null
+++ b/sqitch/deploy/package_metadata_location_id_index.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:package_metadata_location_id_index to pg
+
+BEGIN;
+
+CREATE INDEX package_metadata_location_id ON package_metadata (location_id);
+
+COMMIT;
diff --git a/sqitch/revert/package_metadata_location_id_index.sql b/sqitch/revert/package_metadata_location_id_index.sql
new file mode 100644
index 0000000..c0c980c
--- /dev/null
+++ b/sqitch/revert/package_metadata_location_id_index.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:package_metadata_location_id_index from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 4b969ad..db4bac9 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -80,3 +80,4 @@ increase_derivation_inputs_statistics_targets 2020-12-27T10:34:58Z Christopher B
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
+package_metadata_location_id_index 2021-05-27T19:51:13Z Canan Talayhan <canan.t.talayhan@gmail.com> # Add index for location id
diff --git a/sqitch/verify/package_metadata_location_id_index.sql b/sqitch/verify/package_metadata_location_id_index.sql
new file mode 100644
index 0000000..f300883
--- /dev/null
+++ b/sqitch/verify/package_metadata_location_id_index.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:package_metadata_location_id_index on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;