diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-07-22 12:03:35 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-07-22 12:03:35 +0200 |
commit | 6206dea43941560a29c9a1105ae3055740ab80aa (patch) | |
tree | 724fed8b3ecb1cded103261dfaba3503485fa360 | |
parent | 6205c89b1e289f04dcea1e6e32fafa6357abf063 (diff) | |
download | debian-dedup-6206dea43941560a29c9a1105ae3055740ab80aa.tar.gz |
schema: extend content_package_index
We can avoid a b-tree sort in the package comparison of the web app, if
the package index, also provides a size.
-rw-r--r-- | schema.sql | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2,7 +2,7 @@ CREATE TABLE package (id INTEGER PRIMARY KEY, name TEXT UNIQUE, version TEXT, ar CREATE TABLE content (id INTEGER PRIMARY KEY, pid INTEGER, filename TEXT, size INTEGER, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE); CREATE TABLE hash (cid INTEGER, function TEXT, hash TEXT, FOREIGN KEY (cid) REFERENCES content(id) ON DELETE CASCADE); CREATE TABLE dependency (pid INTEGER, required TEXT, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE); -CREATE INDEX content_package_index ON content (pid); +CREATE INDEX content_package_size_index ON content (pid, size); CREATE INDEX hash_cid_index ON hash (cid); CREATE INDEX hash_hash_index ON hash (hash); |