Search arguments (SARGs) are expressions in one of these forms:
<column> <operator> <expression>
<expression> <operator> <column>
<column> is null
Where:
column is only a column name. If functions, expressions, or concatenation are added to the column name, an index on the column cannot be used.
operator must be one of the following:
=, >, <, >=, <=, !>, !<, <>, !=, is null
expression is either a constant, or an expression that evaluates to a constant. The optimizer uses the index statistics differently, depending on whether the value of the expression is known at compile time:
If expression is a known constant or can be converted to a known constant during preprocessing, it can be compared to the histogram values stored for an index to return accurate row estimates.
If the value of expression is not known at compile time, the optimizer uses the total density to estimate the number of rows to be returned by the query. The value of variables set in a query batch or parameters set within a stored procedure cannot be known until execution time.
If the datatype of the expression is not compatible with the datatype of the column, an index cannot be used, and is not considered.
See “Datatype mismatches and query optimization” for more information.