1

Geography データの Microsoft StCrosses() 関数は空間インデックスをサポートしていますか?

空間インデックスでこの関数を実行しようとすると、次のエラー メッセージが表示されます。

「クエリ プロセッサは、空間インデックス ヒントを含むクエリのクエリ プランを生成できませんでした。理由: 空間インデックスは、述語で指定されたメソッド名をサポートしていません。インデックス ヒントを削除するか、SET FORCEPLAN を削除してみてください」

4

1 に答える 1

2

No.

Indexing spatial data is nontrivial, and the class you are discussing can contain arbitrarily complex figures, not just simple geometric shapes. The specific way shapes and indexing is implemented can make finding overlaps difficult or impossible in the general case. It's also not based on whatever is indexed of the spatial data for complex geometries. This may be why you can't require SQL to only use the index - there is not enough data there. In the degenerate case there may be, but it would not know that, so it is turned off.

Imagine having a star-shape, with complex things embedded in it. The index may only store the boundary of the outer shpe, or the center of the shape, or the bounding rectangle. None of these would be enough to compute the intersect of 2 shapes, or if the shapes actually overlap.

See http://msdn.microsoft.com/en-us/library/bb895265.aspx#geometry to confirm that it is not supported.

于 2012-06-14T17:16:44.927 に答える