>>>I think I pointed that out
Re: Getting from distance for geography coordinates Thread #
1529492 Message #
1529530>>
>>Yes, I have it much simpler now.
>
>In all honesty - you may need that
>
>When I was taking my walk yesterday I figured out the use of the first clause
>
>If you do not have that many records, it does not matter, but with a lot of records there will be a difference in speed
>
>The first clause restricts the set to those that are in a square around you (latitude between .. and ... and longitude between .. and ...)
>
>The second one calculates the radius of the points in the square
Yes, that was my exact point yesterday! And it was even in the link you quoted.
However, I'm not 100% certain it works correctly when applied in derived table or cte. It does work for sure in temp table.
If it's not broken, fix it until it is.
My Blog