• curious_sqldba (9/26/2013)


    Now in my nc index when i dont include C2 it is still using the right index, but when i dont include c1 it is not using the right index. Is it because c1 has null values?

    Because INdex helps when your query's filter/clause has LEFT most column of the index.

    Lets say : if index is on col1 and col2

    then col1 must be part of query then only index will be used.

    but if you ignore col1 and use ONLY col2 then this index will not get used.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)