• Sean Lange (10/3/2012)


    ... Isn't LIKE as good as >= for index seeks?!?

    NO LIKE is not SARGable so you will get scans. It has to examine every row to determine if it is a match or not.

    Actually LIKE is sargable when the pattern expression reduces to matching an initial substring, provided of course the pattern expression is unicode when the column is unicode and not unicode when the column is not unicode; so it doesn't prevent index scans.

    (I remember thisone because it's half of a weird inconsistency: using LIKE to match an initial substring is sargable, while using LEFT is not ;-))

    edit:spelling

    Tom