0

Suppose that I have a table. Its primary key is clustered and consists of exactly one column. Is there ever a reason to also make a non-clustered index on that same column with no other columns in any part of the non-clustered index?

1 Answer 1

3

Not under most circumstances, no. Now,if I sit here and speculate, I could see a situation where because you only have a nonclustered index, the optimizer might choose to do scans against that instead of the clustered index because it's smaller. But the query would have to be only against that one column.

Unless, we change things. Let's say it's a filtered nonclustered index. That might be useful to add to a column depending on the queries in question.

1
  • "because you only have a nonclustered index" - But you don't. The premise of the question is to have both the clustered and non-clustered indexes. I'll edit to make that more clear.
    – J. Mini
    Commented Jan 12 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.