I have the following query which I'd like to speed up from the current
200ms. I do need the distance in meters which is why I'm using
ST_Distance_Sphere. Your help is very much appreciated.


SELECT "places".* FROM (
 SELECT
 *,
 ST_Distance_Sphere(geom, 'SRID=4326;POINT(-79.3937393 43.6526704)') as distance
 FROM places
 ORDER by geom <#> 'SRID=4326;POINT(-79.3937393 43.6526704)' LIMIT 50

 ) AS places
 WHERE "places"."place_category_id" = 10 ORDER BY distance ASC LIMIT 5
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to