Problem Statement
Which WHERE clause is SARGable and most likely to use an index on created_at?
Explanation
SARGable predicates let the engine search the index without transforming the column. Range predicates on the raw column preserve index use.
Wrapping the column in a function forces a scan in many engines because the index on the base value cannot be used directly.
Code Solution
SolutionRead Only
SELECT * FROM events WHERE created_at >= '2025-10-01' AND created_at < '2025-10-02';
Practice Sets
This question appears in the following practice sets:
