SQLite Forum

SELECT optimization for constant expression
This other thread about LIKE was also started by me and mostly concerned the ICU extension (for Unicode) in conjunction with LIKE. Anyway, the splitting above is useless. SQLite will make a new query plan after binding of parameters and therefore can detect LIKE patterns that do not start with a wildcard character, and it will automatically use an index; a few more conditions have to be met, however - read the [fine material](https://www.sqlite.org/optoverview.html#the_like_optimization) (esp. the last paragraph of section 5).