Hi @moondaddy ,
Thank you so much for posting here.
You could refer David's answer.
Only adding some notes here:
According to Microsoft Learn, spatial indexes will be used with geography types on the following methods when they appear at the beginning of a comparison predicate with a WHERE clause:
- STIntersects
- STDistance
- STEquals
You could also refer Improving the performance of STIntersects and check whether it is helpful to you.
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hot issues November--What can I do if my transaction log is full?
Hot issues November--How to convert Profiler trace into a SQL Server table