MySQL regexp by index
1 answer
No, regular expression searches cannot use an index. If the thing you're applying the regex to is an index, it might go a little faster, but you're essentially scanning a table.
The only workaround I know of is to use LIKE 'foo%'
instead RLIKE 'foo.*'
if it's your regex. An index on such a column can use LIKE, but not RLIKE
+4
a source to share