In the past, I have chosen the datetime
column created as inappropriate clustered index in the table.
Now I concluded (base on the execution plan) that it would be better to choose the ID identity primary key as the clustered key, because it is referenced as foreign key very often.
I would like to drop the current clustered key and create a new, but I cannot drop the primary key, because that the full-text
index is dependent on that primary key.
Can I just switch primary key to clustered index or do I need to drop the primary key and the chain of all dependent objects?
Bellow you will find table definition and clustered index definition.
CREATE TABLE [dbo].[Realty](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Created] [datetime] NOT NULL,
....
CONSTRAINT [PK_Realty] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
...
CREATE CLUSTERED INDEX [Created] ON [dbo].[Realty]
(
[Created] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO