• ScottPletcher (5/27/2015)


    Very surprising that SQL doesn't the index on which it can do almost a full seek.

    Do you really need the "PersonID<>0", or could you remove that? I believe that condition could force SQL to do two separate seeks of the index, once for < 0 and one for > 0.

    Another question to ask regarding PersonID is what are the values in that column. If the minimum value is 0 or possibly null, instead of <> 0 just use > 0.