diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-19 12:32:51 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-19 12:32:51 +0100 |
commit | d5422cb98f377fe6388a718425822b0896c3cced (patch) | |
tree | 3dde8fcc6de4e2c4094b3d6ec449d83ac01223ab /sources/db/post.sql | |
parent | 8c37c70d218e78468ab5111586e509ad0caa3dcc (diff) | |
download | taginfo-d5422cb98f377fe6388a718425822b0896c3cced.tar taginfo-d5422cb98f377fe6388a718425822b0896c3cced.tar.gz |
Rename (key|tag)pairs to (key|tag)_combinations
Diffstat (limited to 'sources/db/post.sql')
-rw-r--r-- | sources/db/post.sql | 20 |
1 files changed, 10 insertions, 10 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'; |