سؤال

I am creating a spatial index on a geography column in SQL Server Azure Server like below..

CREATE SPATIAL INDEX sp_idx ON TableA(GeographyAreaCode) USING GEOGRAPHY_GRID WITH (GRIDS = (LEVEL_1 = LOW, LEVEL_2 = LOW, LEVEL_3 = HIGH, LEVEL_4 = HIGH), CELLS_PER_OBJECT = 16, DROP_EXISTING = ON)

Now I've observed that two indexes with the given name sp_idx are being created - one spatial and the other as Clustered index..

Does SQL Server create a mandatory clustered index with the spatial index?

Also If I have to delete this index, will it delete the associated Clustered index also?

Many Thanks in Advance,

هل كانت مفيدة؟

المحلول

all SQL azure tables require a clustered index: http://msdn.microsoft.com/en-us/library/windowsazure/ee336245.aspx#cir

This is by design. To answer your questions:

Removing the special index should not remove the clustered index. SQL Azure probably created the clustered index, because you didn't have one and it is a requirement in SQL Azure. I would manage clustered indexes on my own not have SQL Azure put default ones on there, just to satisfy requirements.

Update

You can only have ONE clustered index on any SQL table. There are no other clustered indexes that are managed on a table with a clustered index already existing. I hope that helps with your comment below.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top