Can anyone explain why LIKE queries do not use an index when the LIKE string contains 
a forward slash?

Example:
CREATE TABLE words (  word varchar(250) PRIMARY KEY );

Populate table with 200,000+ rows

EXPLAIN SELECT * FROM words WHERE word LIKE 'abcdef';
This query uses the Primary key to search

EXPLAIN SELECT * FROM words WHERE word LIKE 'abc/def';
This query does not use any key and scans ALL rows

I am on Windows, MySQL 3.23.32. Is it a bug?

Reply via email to