diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-17 18:27:01 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-17 18:27:01 +0100 |
commit | d22886fe9671af0f24e8619501c8df422f0b708f (patch) | |
tree | c153d20951e180f354cf164ad77648a5716a0fa2 /sources/db | |
parent | 54a80b7853bb3122b1ad25f4e57e25d23f4d741d (diff) | |
download | taginfo-d22886fe9671af0f24e8619501c8df422f0b708f.tar taginfo-d22886fe9671af0f24e8619501c8df422f0b708f.tar.gz |
Remove unused prevalent_values field in keys sql table
Diffstat (limited to 'sources/db')
-rw-r--r-- | sources/db/post.sql | 12 | ||||
-rw-r--r-- | sources/db/pre.sql | 3 |
2 files changed, 1 insertions, 14 deletions
diff --git a/sources/db/post.sql b/sources/db/post.sql index ddcc80e..5567f19 100644 --- a/sources/db/post.sql +++ b/sources/db/post.sql @@ -65,18 +65,6 @@ INSERT INTO stats (key, value) SELECT 'characters_in_keys_rest', count(*) FRO INSERT INTO stats (key, value) VALUES ('objects', (SELECT sum(value) FROM stats WHERE key IN ('nodes', 'ways', 'relations'))); INSERT INTO stats (key, value) VALUES ('object_tags', (SELECT sum(value) FROM stats WHERE key IN ('node_tags', 'way_tags', 'relation_tags'))); --- XXX this can probably be removed -UPDATE keys SET prevalent_values=( - SELECT group_concat(value, '|') FROM ( - SELECT value FROM tags t - WHERE t.key = keys.key - AND t.count_all > keys.count_all / 100 - ORDER BY t.count_all DESC - LIMIT 10 - - ) - ) WHERE values_all < 1000; - INSERT INTO prevalent_values (key, value, count, fraction) SELECT t.key, t.value, t.count_all, CAST(t.count_all AS REAL) / CAST(k.count_all AS REAL) FROM tags t, keys k WHERE t.key = k.key diff --git a/sources/db/pre.sql b/sources/db/pre.sql index a7f0351..4be43ab 100644 --- a/sources/db/pre.sql +++ b/sources/db/pre.sql @@ -31,8 +31,7 @@ CREATE TABLE keys ( in_josm INTEGER DEFAULT 0, in_potlatch INTEGER DEFAULT 0, in_merkaartor INTEGER DEFAULT 0, - characters VARCHAR, - prevalent_values TEXT + characters VARCHAR ); DROP TABLE IF EXISTS prevalent_values; |