question

rudi_brits avatar image
rudi_brits asked

Can a spatial index be created on a geography column in a table variable

I am familiar with the syntax to create an index inline when declaring a table variable, but I am unable to create an inline spatial index on a geography field in a table variable.

I am trying to create a spatial index, i.e:

CREATE SPATIAL INDEX SDX_xTD_eGeog ON @T ( C1 ) USING GEOGRAPHY_GRID WITH ( GRIDS=(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH) , CELLS_PER_OBJECT = 64 , PAD_INDEX = OFF , SORT_IN_TEMPDB = OFF , DROP_EXISTING = OFF , ALLOW_ROW_LOCKS = ON , ALLOW_PAGE_LOCKS = ON ) ;

on a column in a table variable

group-bytable-variablespatialgeography
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.