Originally posted by svk
Now, the plan for the same query shows INDX_2 being used. Use of this index is not proper because it is less selective and hence slows down the query.
Why do you think that INDX_1 is more efficient than INDEX_2 in this case? You can't say that only based on the number of columns in the index! It might very well be the case that INDEX_2 is much more efficient than INDEX_1, unless you forgot to mention that all the columns from INDEX_1 are also included in INDEX_2.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?