Home Forums SQL Server 2008 T-SQL (SS2K8) returning rows within a certain distance in miles from city using longitude and latitude RE: returning rows within a certain distance in miles from city using longitude and latitude

  • I've played with some real data (half a million cities around the world from http://dev.maxmind.com/geoip/legacy/geolite/) and have really got great perfomance gain when using sargable geo rectangle predicate against plain point1.STDistance(point2) < ...

    Nothing unuexpected, just optimizer can use indexes. It requierd some dynamic sql.

    Let me know if it is intresting for you.