Hi @LooneyOMooney ,
Thank you so much for posting here.
Please refer below and check whether it is helpful:
select A.*, B.*
FROM TableA A WITH(INDEX([SPATIAL_INDEX_NAME]))
LEFT OUTER JOIN TableB B
ON A.Shape.STCentroid().STIntersects(B.Shape) = 1
You could consider to add an index hint " WITH(INDEX(...)) " as this will speed up the query.
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
Hi @LooneyOMooney ,
Could you please validate all the answers so far and provide any update?
Please remember to accept the answers if they helped. Your action would be helpful to other users who encounter the same issue and read this thread.
Thank you for understanding!
Best regards
Melissa