Should LIKE ‘searchstr%’ use an index?
An index cannot safely be used in this case. A naive implementation would transform this: … WHERE word LIKE ‘search_string%’ into … WHERE word >= ‘search_string’ AND word < ‘search_strinh’ by incrementing the last character of the search string. The greater-than and less-than operators can use an index, where LIKE cannot. Unfortunately, that won’t work … Read more