I asked this question on gis.stackexchange.com as well, but hope to catch some more expertise here. I have OpenStreetMap data for the Netherlands loaded into a PostGIS database (PostgreSQL 8.3 / PostGIS 1.3.3) using the osmosis schema. This means all tags are stored in a hstore field. In addition to the GIST index that osmosis creates on the geometry field, I created an additional GIST index on the tags field. Trying to query using both a spatial constraint and a constraint on the tags field, I find that it is slower than I would like. A query like this one:
takes 22 seconds to return 78 records. There are around 53 million records in this table. Is there a way to significantly speed this up? I've heard that hstore is implemented significantly better in PostgreSQL 9, would upgrading help? asked 22 Mar '11, 16:06 mvexel |
I've never optimised a hstore column, so I can't speak to that. If you split out the answered 15 Dec '14, 14:14 rorym |