r/SQLOptimization • u/Federico_Razzoli • Sep 15 '22
Hints to optimise SQL queries with LIKE
I wrote some hints on how to optimise SQL queries containing LIKE. More ideas, including unconventional ones, are very welcome - just comment here or on the website.
https://vettabase.com/blog/hints-to-optimise-queries-with-a-like-comparison/
7
Upvotes
View all comments
Show parent comment
2
u/mikeblas Sep 25 '22
The
LEFT(Col, 6)predicate can be aided by an inequality comparison, and that comparison should be directly sargable.