aboutsummaryrefslogtreecommitdiff
path: root/sources/db
diff options
context:
space:
mode:
Diffstat (limited to 'sources/db')
-rw-r--r--sources/db/post.sql20
-rw-r--r--sources/db/pre.sql8
-rwxr-xr-xsources/db/tagstatsbin444582 -> 417137 bytes
3 files changed, 14 insertions, 14 deletions
diff --git a/sources/db/post.sql b/sources/db/post.sql
index 5567f19..6a25f4a 100644
--- a/sources/db/post.sql
+++ b/sources/db/post.sql
@@ -15,20 +15,20 @@ PRAGMA cache_size = 5000000;
CREATE UNIQUE INDEX keys_key_idx ON keys (key);
CREATE INDEX tags_key_idx ON tags (key);
-- CREATE UNIQUE INDEX tags_key_value_idx ON tags (key, value);
-CREATE INDEX keypairs_key1_idx ON keypairs (key1);
-CREATE INDEX keypairs_key2_idx ON keypairs (key2);
+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 INDEX tagpairs_key1_value1_idx ON tagpairs (key1, value1);
-CREATE INDEX tagpairs_key2_value2_idx ON tagpairs (key2, value2);
+CREATE INDEX tag_combinations_key1_value1_idx ON tag_combinations (key1, value1);
+CREATE INDEX tag_combinations_key2_value2_idx ON tag_combinations (key2, value2);
CREATE UNIQUE INDEX relation_types_rtype_idx ON relation_types (rtype);
CREATE INDEX relation_roles_rtype_idx ON relation_roles (rtype);
INSERT INTO selected_tags (skey, svalue)
- SELECT key1, value1 FROM tagpairs WHERE value1 != ''
+ SELECT key1, value1 FROM tag_combinations WHERE value1 != ''
UNION
- SELECT key2, value2 FROM tagpairs WHERE value2 != '';
+ SELECT key2, value2 FROM tag_combinations WHERE value2 != '';
UPDATE selected_tags SET
count_all = (SELECT t.count_all FROM tags t WHERE t.key=skey AND t.value=svalue),
@@ -50,10 +50,10 @@ INSERT INTO stats (key, value) SELECT 'num_tags_on_nodes', count(*) FROM
INSERT INTO stats (key, value) SELECT 'num_tags_on_ways', count(*) FROM tags WHERE count_ways > 0;
INSERT INTO stats (key, value) SELECT 'num_tags_on_relations', count(*) FROM tags WHERE count_relations > 0;
-INSERT INTO stats (key, value) SELECT 'num_keypairs', count(*) FROM keypairs;
-INSERT INTO stats (key, value) SELECT 'num_keypairs_on_nodes', count(*) FROM keypairs WHERE count_nodes > 0;
-INSERT INTO stats (key, value) SELECT 'num_keypairs_on_ways', count(*) FROM keypairs WHERE count_ways > 0;
-INSERT INTO stats (key, value) SELECT 'num_keypairs_on_relations', count(*) FROM keypairs WHERE count_relations > 0;
+INSERT INTO stats (key, value) SELECT 'num_key_combinations', count(*) FROM key_combinations;
+INSERT INTO stats (key, value) SELECT 'num_key_combinations_on_nodes', count(*) FROM key_combinations WHERE count_nodes > 0;
+INSERT INTO stats (key, value) SELECT 'num_key_combinations_on_ways', count(*) FROM key_combinations WHERE count_ways > 0;
+INSERT INTO stats (key, value) SELECT 'num_key_combinations_on_relations', count(*) FROM key_combinations WHERE count_relations > 0;
INSERT INTO stats (key, value) SELECT 'characters_in_keys_plain', count(*) FROM keys WHERE characters='plain';
INSERT INTO stats (key, value) SELECT 'characters_in_keys_colon', count(*) FROM keys WHERE characters='colon';
diff --git a/sources/db/pre.sql b/sources/db/pre.sql
index 4be43ab..8353b2f 100644
--- a/sources/db/pre.sql
+++ b/sources/db/pre.sql
@@ -70,9 +70,9 @@ CREATE TABLE tags (
in_merkaartor INTEGER DEFAULT 0
);
-DROP TABLE IF EXISTS keypairs;
+DROP TABLE IF EXISTS key_combinations;
-CREATE TABLE keypairs (
+CREATE TABLE key_combinations (
key1 VARCHAR,
key2 VARCHAR,
count_all INTEGER,
@@ -81,9 +81,9 @@ CREATE TABLE keypairs (
count_relations INTEGER
);
-DROP TABLE IF EXISTS tagpairs;
+DROP TABLE IF EXISTS tag_combinations;
-CREATE TABLE tagpairs (
+CREATE TABLE tag_combinations (
key1 VARCHAR,
value1 VARCHAR,
key2 VARCHAR,
diff --git a/sources/db/tagstats b/sources/db/tagstats
index 24e695d..24da09e 100755
--- a/sources/db/tagstats
+++ b/sources/db/tagstats
Binary files differ