Search code examples
sql-server-2008viewindexingspatialindexed-view

How can I create a Spatial Index on an Indexed View?


I have a view which already has SchemaBinding applied AND it has a UNIQUE CLUSTERED index.

Now, I'm trying to add a second index, which is a SPATIAL index ... and I get the following error message:-

enter image description here

And here's the a picture of the schema:

enter image description here


Solution

  • FFS - I found my answer.

    Spatial Indexes cannot be specified on indexed views.

    The error message is incorrect / misleading.

    Cheers & Heads up to a previous SO question which is very similar.

    Epic Fail again.

    enter image description here

    enter image description here