[postgis-users] about range query

superman0920 superman0920 at gmail.com
Fri May 4 19:11:20 PDT 2012


hi
I have over 8500000 records in the postgresql and every record has a geom column what is store a point.
I get a point coordinate(eg 116.1124,39.9046 ) and I want to know the coordinates of db points which is in 500m range.

I use 
ST_Distance(
the_geom,
'srid=4326;point(116.1124 39.9046)'
) <= 500
but the query is very slow(about take 15s)

Is there some another way can do fast ?




superman0920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120505/8b7cb764/attachment.html>


More information about the postgis-users mailing list