Answer
SARGability (Search ARGument-ability) describes whether a predicate can efficiently use an index to seek rows instead of scanning.
SARGable predicates:
- Simple comparisons like
Column = @Value,Column >= @Start AND Column <= @End. - Allow the optimizer to perform index seeks and range scans.
Non-SARGable patterns:
- Applying functions to columns:
WHERE LOWER(Col) = 'abc'. - Expressions on the left side:
WHERE Col + 1 = 10. - Implicit conversions that change the column's data type.
- Leading wildcards:
LIKE '%abc'.
Ensuring predicates are SARGable is one of the most impactful techniques in query tuning: it allows indexes to be used effectively, minimizing reads and dramatically improving performance.