This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Use ST_DWithin in where clause #213
Comments
cheungpat
added a commit
to cheungpat/skygear-server
that referenced
this issue
Nov 8, 2016
Previously, predicate comparing distance were always compared using `ST_Distance_Sphere`. Using `ST_DWithin` is better for comparing where a location is within a certain distance because the latter make use of available indexes. While skygear-server does not create indexes on location field automatically. Developer can add index to columns on their own. refs SkygearIO#213
cheungpat
added a commit
to cheungpat/skygear-server
that referenced
this issue
Nov 8, 2016
Previously, predicate comparing distance were always compared using `ST_Distance_Sphere`. Using `ST_DWithin` is better for comparing where a location is within a certain distance because the latter make use of available indexes. While skygear-server does not create indexes on location field automatically, advance developer can add index to columns on their own. refs SkygearIO#213
cheungpat
added a commit
to cheungpat/skygear-server
that referenced
this issue
Nov 8, 2016
Previously, predicate comparing distance were always compared using `ST_Distance_Sphere`. Using `ST_DWithin` is better for comparing where a location is within a certain distance because the latter make use of available indexes. While skygear-server does not create indexes on location field automatically, advance developer can add index to columns on their own. refs SkygearIO#213
rickmak
pushed a commit
that referenced
this issue
Nov 9, 2016
Previously, predicate comparing distance were always compared using `ST_Distance_Sphere`. Using `ST_DWithin` is better for comparing where a location is within a certain distance because the latter make use of available indexes. While skygear-server does not create indexes on location field automatically, advance developer can add index to columns on their own. refs #213
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use
ST_DWithin(p1, p2, d)
(http://postgis.net/docs/ST_DWithin.html) which automatically makes use of index available on the column to replace the expressionST_Distance_Sphere(p1, p2) < d
The text was updated successfully, but these errors were encountered: