CREATE TABLE [dbo].[TicketTasks]
(
[TicketTaskId] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[TicketTaskTypeId] [char](2) NOT NULL,
[TicketId] [int] NOT NULL,
[CreatedUtc] [datetime] NOT NULL,
[DeletedUtc] [datetime] NULL,
[DepartmentId] [int] NOT NULL,
[TaskAction] [nvarchar](max) NULL,
[TaskResult] [nvarchar](max) NULL,
[TaskPrivateNote] [nvarchar](max) NULL,
CONSTRAINT [PK_TicketTasks]
PRIMARY KEY CLUSTERED ([TicketTaskId] ASC)
)
HI this is my table structure.
I have around 50 million records in this table. Currently I have to drop and recreate non clustered index for TicketID to sort in desc.
Does this dropping of non clustered index affect any other indexes?
Will it remove the full text indexing done for the table?
Common non-clustered indexes are independent of each other, the only problem you might get will be if you tamper with the clustered one (usually accompanied by a PRIMARY KEY
), since it physically reorganizes the data and all other indexes contain a pointer to it.
However, full text indexes are attached to an index that enforces uniqueness of values (a UNIQUE
index). This is done by the KEY INDEX
option when creating the full text index:
CREATE FULLTEXT INDEX
ON [dbo].[TicketTasks](TaskAction)
KEY INDEX <UniqueIndexName>
So as long as you don't change this referenced unique index, you can drop the other non-clustered indexes.