This is really strange issue. I have created a table on my dev environment first. Copied the data from another table. Created Indices / Pk and then used a query which doesnt want to use right index. I have NC Index on my Lastupdate , Log , type
colmns and I have CI on my Identity col called "CluIndex".
And when I use a query "select * from table where lastupdate >= '09/16/2010'", it takes for ever to get the result back. And when I check the Display query exec plan, it shows its using CI which is not right. If I use query hint with the right index,
the results are quick. So basically query plan is not using the right index.
Weird thing is that, this same table (I created myself with same steps) uses the right Index in production.
View Complete Post