Sample Header Ad - 728x90

Non-clustered index covering a clustered index

0 votes
2 answers
175 views
I have a table that has the following indexes: **IXC** clustered index that includes a single column : A asc. **IX1** that includes two columns : A asc, B asc. In this case ICX seems like a duplicate index of IX1. Is it a good idea to delete ICX and make IX1 the clustered index in that case? Or is there scenarios where this would be a bad idea? DDL example : CREATE TABLE [dbo].[foo] ( [A] NVARCHAR (20) NOT NULL, [B] INT NULL, [C] NVARCHAR (20) NOT NULL, [D] NVARCHAR (20) NOT NULL, [E] NVARCHAR (20) NOT NULL, ); GO CREATE CLUSTERED INDEX [IXC] ON [dbo].[foo]([A] ASC); GO CREATE NONCLUSTERED INDEX [IX1] ON [dbo].[foo]([A] ASC, [B] ASC);
Asked by Kimo (229 rep)
Jan 16, 2020, 07:10 AM
Last activity: Jul 15, 2025, 12:43 PM