Problem Statement
Which LIKE predicate can use a standard B-tree index in most engines?
Explanation
A leading wildcard breaks the ability to seek from the left, so the index is not used. A prefix search like 'son%' can seek to the prefix range.
If you need case-insensitive search, consider functional indexes or citext/GIN features where available.
Code Solution
SolutionRead Only
SELECT * FROM people WHERE name LIKE 'son%';
Practice Sets
This question appears in the following practice sets:
