Tag queries extremely slow
Hi. I started the following (simple) query on devserver and for comparison on toolserver: hstore=> EXPLAIN ANALYZE SELECT osm_id,text(tags->'parking:condition:left:vehicles') as "parking:condition:left:vehicles" FROM planet_line WHERE (tags ? 'parking:condition:left:vehicles'); QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Seq Scan on planet_line (cost=0.00..2625891.24 rows=34947 width=210) (actual time=2563623.450..4016718.418 rows=4 loops=1) Filter: (tags ? 'parking:condition:left:vehicles'::text) Total runtime: 4016748.084 ms (3 Zeilen) osm_mapnik=> EXPLAIN ANALYZE SELECT osm_id,text(tags->'parking:condition:left:vehicles') as "parking:condition:left:vehicles" FROM planet_line WHERE (tags ? 'parking:condition:left:vehicles'); QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Bitmap Heap Scan on planet_line (cost=3470.04..129424.69 rows=34857 width=211) (actual time=0.135..0.144 rows=4 loops=1) Recheck Cond: (tags ? 'parking:condition:left:vehicles'::text) -> Bitmap Index Scan on planet_line_tags (cost=0.00..3461.33 rows=34857 width=0) (actual time=0.080..0.080 rows=4 loops=1) Index Cond: (tags ? 'parking:condition:left:vehicles'::text) Total runtime: 0.226 ms (5 rows) so the factor of about 20.000.000 (sic!) is easily explained by a missing index on tags. Is this going to be changed? Ciao, Kay
Kay Drangmeister schrieb:
so the factor of about 20.000.000 (sic!) is easily explained by a missing index on tags. Is this going to be changed?
We're still importing diffs. Osmosis died about 20 hours ago and so the import stopped but now it's running again. We planned to add the index after the diffs catched up. Please do not use the hstore database until that, as it will slow down the import very much. Thank you, Peter
Peter Körner <osm-lists@mazdermind.de> wrote:
We're still importing diffs. Osmosis died about 20 hours ago and so the import stopped but now it's running again. We planned to add the index after the diffs catched up.
Do you know why this happened? Sven -- "We don't know the OS that God uses, but the Vatican uses Linux" (Sister Judith Zoebelein, Vatican Webmaster) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Sven Geggus schrieb:
Peter Körner <osm-lists@mazdermind.de> wrote:
We're still importing diffs. Osmosis died about 20 hours ago and so the import stopped but now it's running again. We planned to add the index after the diffs catched up.
Do you know why this happened? No - it just got stuck without writing anything to the logs.
Peter
participants (3)
-
Kay Drangmeister -
Peter Körner -
Sven Geggus