开发者

What does SQL Server do for spatial data outside the bounding box of the index?

I read an article that says:

The (x-min,y-min) and (x-max,y-max) coordinates determine the placement and dimensions of the bounding box. The space outside of the bounding box is treated as a sin开发者_如何学运维gle cell that is numbered 0.

I took this to mean 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)

Where @MyShape is entirely outside the bounding box, it should only check things outside of the bounding box (so it still uses the index).

But later, the article says:

Only operations computed on objects that are entirely inside of the bounding box benefit from the spatial index.

Which seems to say the opposite -- that if @MyShape is outside the bounding box, it will do a full table scan.

Which is it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜