diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-07-03 21:19:13 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-07-03 21:19:13 +0200 |
commit | 56d048320a358b2c417cdb2211b3640394a182e9 (patch) | |
tree | ef5c52619ff18c4f3391b4eb19301999de4c66e7 /schema.sql | |
parent | f2bd48d342518c11ec7deaeee5b437ac524514de (diff) | |
download | debian-dedup-56d048320a358b2c417cdb2211b3640394a182e9.tar.gz |
store hash values as sqlite BLOB
They were previously hex encoded, so this should cut the space consumed
by hashes in half. A first benchmark indicates that the savings in
database size are in the order of 30%.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,6 +1,6 @@ CREATE TABLE package (package TEXT PRIMARY KEY, version TEXT, architecture TEXT, source TEXT); CREATE TABLE content (id INTEGER PRIMARY KEY, package TEXT, filename TEXT, size INTEGER, FOREIGN KEY (package) REFERENCES package(package) ON DELETE CASCADE); -CREATE TABLE hash (cid INTEGER, function TEXT, hash TEXT, FOREIGN KEY (cid) REFERENCES content(id) ON DELETE CASCADE); +CREATE TABLE hash (cid INTEGER, function TEXT, hash BLOB, FOREIGN KEY (cid) REFERENCES content(id) ON DELETE CASCADE); CREATE TABLE dependency (package TEXT, required TEXT, FOREIGN KEY (package) REFERENCES package(package) ON DELETE CASCADE); CREATE INDEX content_package_index ON content (package); CREATE INDEX hash_cid_index ON hash (cid); |