[postgis-users] Postgres/Postgis query very slow

iKey eike.lueders at gmail.com
Thu Apr 1 02:35:09 PDT 2010


Hey,
I've set up a Postgres database with Postgis support.
Now I try to excecute the following query:

SELECT DISTINCT p.*
FROM punkte p, lines l
WHERE l.tags LIKE '%"highway"="footway"%'
    AND CONTAINS(BUFFER(l.the_geom, 500), p.the_geom)

You can download the SQL's to create the tables from my server:
http://thisisliving.info/sql.zip

It should return all datasets from the table punkte that are within a buffer
of 500m around the datasets of the lines table.
Anyway the query works fine, but it's veeeeery slow. It takes about 10
minutes to get the results (1969).
Now my question is if there is a way to speed up the query a bit.
All help is appreciated.
Thank you
Eike Lüders

-- 
View this message in context: http://old.nabble.com/Postgres-Postgis-query-very-slow-tp28106198p28106198.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list