/* SARGable Queries use the following pattern: Column Op Const/Variable Where: Column is the column to evaluate. Op is an operator such as =,>=,<=,>, <, and BETWEEN And Const/Variable is either a constant or a variable */ -- Simple examples of valid SARGs: WHERE last_name = 'McDonald' OR Age > @minAge OR Posts != 0 -- Slightly more complex examples of valid SARGs: WHERE startdate > '2007-12-01' OR inventory > @threshold + 20 -- Non-SARGable WHERE clauses examples: WHERE inventory + 20 > @threshold OR DATEPART(mm,startdate) > 5 -- The LIKE operator can also be SARGable - provided that -- wildcards come after initial text. Therefore the following -- is a valid SARG: WHERE fname LIKE 'Jo%' -- But this LIKE operation is not SARGABLE, and will -- not be able to take advantage of index seeks. WHERE fname LIKE '%hn%'