[postgis-users] Postgres/Postgis query very slow
Marko Čubranić
mcubranic at gmail.com
Thu Apr 1 02:37:38 PDT 2010
index your data if you havent..
2010/4/1 iKey <eike.lueders at gmail.com>
>
> 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.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100401/30bdfb7d/attachment.html>
More information about the postgis-users
mailing list