diff options
author | Jochen Topf <jochen@topf.org> | 2010-11-06 16:13:39 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2010-11-06 16:13:39 +0100 |
commit | 08f5fc6f39402873942051dbbd068c6f69766c9d (patch) | |
tree | c3a467b5b6a47e4642890899f7c65c21778362fc /sources/db | |
parent | f58d0baf67458a504dfeb1b7277434e2ad062179 (diff) | |
download | taginfo-08f5fc6f39402873942051dbbd068c6f69766c9d.tar taginfo-08f5fc6f39402873942051dbbd068c6f69766c9d.tar.gz |
Begin of stats refactoring
Diffstat (limited to 'sources/db')
-rw-r--r-- | sources/db/post.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/db/post.sql b/sources/db/post.sql index 8f0b2fb..22f05af 100644 --- a/sources/db/post.sql +++ b/sources/db/post.sql @@ -45,6 +45,9 @@ INSERT INTO stats (key, value) SELECT 'characters_in_keys_space', count(*) FRO INSERT INTO stats (key, value) SELECT 'characters_in_keys_problem', count(*) FROM keys WHERE characters='problem'; INSERT INTO stats (key, value) SELECT 'characters_in_keys_rest', count(*) FROM keys WHERE characters='rest'; +INSERT INTO stats (key, value) VALUES ('objects', (SELECT sum(value) FROM stats WHERE key IN ('nodes', 'ways', 'relations'))); +INSERT INTO stats (key, value) VALUES ('objects_tags', (SELECT sum(value) FROM stats WHERE key IN ('node_tags', 'way_tags', 'relation_tags'))); + UPDATE keys SET prevalent_values=( SELECT group_concat(value, '|') FROM ( SELECT value FROM tags t |