summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Berg2020-03-24 16:26:40 +0000
committerChristoph Berg2020-03-24 16:26:40 +0000
commit70ae7e285f7e58b9f7b7271bf88ab56dfa816389 (patch)
treea86c28c2befeb2200a3e6de296bab540c8036f6e
parent7d754224f10018d186e7ecc6bdc94d45892d8b08 (diff)
Create some indexes on the archive tables
-rw-r--r--pgapt-db/sql/pgdg_apt.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/pgapt-db/sql/pgdg_apt.sql b/pgapt-db/sql/pgdg_apt.sql
index fc19487..78a8c3f 100644
--- a/pgapt-db/sql/pgdg_apt.sql
+++ b/pgapt-db/sql/pgdg_apt.sql
@@ -79,6 +79,9 @@ CREATE TABLE sourcefile (
);
COMMENT ON TABLE sourcefile IS 'files belonging to source packages including historic ones';
+CREATE INDEX ON sourcefile (source, srcversion);
+CREATE INDEX ON sourcefile (upload);
+
CREATE TABLE package (
package text NOT NULL,
@@ -97,6 +100,9 @@ CREATE TABLE package (
--ALTER TABLE package ADD FOREIGN KEY (source, srcversion) REFERENCES source (source, srcversion);
COMMENT ON TABLE package IS 'binary packages including historic ones';
+CREATE INDEX ON package (source);
+CREATE INDEX ON package (upload);
+
-- SUITE DATA