Spatial Data Hurts My Brain

spatial data, SQLServerPedia Syndication, TSQL
I'm still barely scratching the surface working with spatial data in SQL Server 2008. We've ported some of the data into a table where we built a geography spatial data column and we're begginning to work with point data. The requirements from the developers are, so far, very simple. They'll feed me a point and I find all the locations "close" to it. We had to go round & round on what defines "close" but finally settled on, I think, 15km. The query to answer a question like this is ridiculously simple (a few object names have been changed): [crayon-5a6bf1fb42c67703518117/] I'm not even hard-coding the "close" value so it can change when they change their minds. It retrieves exactly what's needed. But... Well, look at the STATISTICS IO & TIME:…
Read More