I know that varchar_pattern_ops
exists in Postgresql for fast, index-based searches in a LIKE
query, but is there any similar functionality for MySQL?<
Do the fact that MySQL indexes the left side of a string.
Then a string column can use the index if the query use wildcard right side :
SELECT * FROM your_table WHERE field LIKE "text%" # can use an index
but remember that for index there is a limit of 767 bytes
From Mysql DOC
A B-tree index can be used for column comparisons in expressions that use the =, >, >=, <, <=, or BETWEEN operators. The index also can be used for LIKE comparisons if the argument to LIKE is a constant string that does not start with a wildcard character.
https://dev.mysql.com/doc/refman/8.0/en/index-btree-hash.html