tony28 (5/7/2013)
Hello,i have maybe stupid question
why sometimes the SELECT use Noncluster index instead cluster index
I thought that still use PK like primary, if there is value what I searched, but if I created new one just with the searched value is faster.
thx for response
Hey tony,
Its depend on SQL Server query optimizer to select a clustered or nonclustered index for any script(But in general optimizer select index on the basis of columns used in where clause).
If u r not using those columns which are in PK or clustered index then it not worth to use such clustered index instead of a nonclustered index which have those column which are used in where clause in your scripts.