0

In short, are STDisjoint() and STIntersects() antipodes of each other? According to the documentation, it seems that they are. But there is no explicit note about it.

Are there any tricks? Which one is faster, for example?

1

Mathematically, disjoint = not intersects.

As to which is faster, according to the documentation on spatial indexes at http://msdn.microsoft.com/en-us/library/bb895265.aspx#methods , a spatial index can be used for a query containing geometry1.STIntersects(geometry2) = 1.

Strangely enough, geometry1.STDisjoint(geometry2) = 0 is not listed.

3
  • It seems that I miss something in the mathematical definitions of these operations. Could you provide a link to materials about them? BTW thx for the answer. Indexing is quite important in my task. – Vasilly.Prokopyev Aug 14 '14 at 8:32
  • @Colin'tHart Probably for the same reason that column = @X can use an index while column <> @X usually doesn't. – ypercubeᵀᴹ Aug 14 '14 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.