I read an article that says:
(x-min, y-min) and (x-max, y-max) coordinates determine the location and size of the bounding box. Space outside the bounding box is considered as one cell, which is numbered 0.
I took this as meaning that everything "outside" the index is actually indexed in a special place, so if I do something like:
SELECT * FROM GeometryTable WHERE @MyShape.STContains(GeometryColumn)
If @MyShapecompletely outside the bounding box, it should only scan objects outside the bounding box (therefore, it still uses the index).
But later in the article it says:
Only operations computed on objects that are completely within the bounding box benefit from the spatial index.
It seems the other way around: if it @MyShapeis outside the bounding box, it will perform a full table scan.
What is it?
source
share