summaryrefslogtreecommitdiff
path: root/sources/db/post.sql
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-12 11:17:23 +0200
committerJochen Topf <jochen@topf.org>2014-05-12 11:17:23 +0200
commitb46b21e3437a8ea04429995c038b64d654eaa48e (patch)
treedbf4d3e5be7b1d745f8b4527930e0314b2b4d876 /sources/db/post.sql
parent5407efff508b5428f30ea28f113bf370815dfabe (diff)
downloadtaginfo-b46b21e3437a8ea04429995c038b64d654eaa48e.tar
taginfo-b46b21e3437a8ea04429995c038b64d654eaa48e.tar.gz
Add code to create maps for tags.
For a long time we had the capability to create overview maps for keys, but never for tags (ie key-value-combinations). This commit now adds code to create maps for frequently used tags. We can't create maps for all tags, because each map takes about 8k in RAM and there are a lot of tags.
Diffstat (limited to 'sources/db/post.sql')
-rw-r--r--sources/db/post.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/db/post.sql b/sources/db/post.sql
index 0edba18..35c0a43 100644
--- a/sources/db/post.sql
+++ b/sources/db/post.sql
@@ -19,6 +19,8 @@ CREATE INDEX key_combinations_key1_idx ON key_combinations (key1);
CREATE INDEX key_combinations_key2_idx ON key_combinations (key2);
CREATE UNIQUE INDEX key_distributions_key_idx ON key_distributions (key, object_type);
+CREATE UNIQUE INDEX tag_distributions_key_value_idx ON tag_distributions (key, value, object_type);
+
CREATE INDEX tag_combinations_key1_value1_idx ON tag_combinations (key1, value1);
CREATE INDEX tag_combinations_key2_value2_idx ON tag_combinations (key2, value2);