Although the Title column was added as index by using the following query:
ALTER TABLE Recipe ADD INDEX Title_idx (Title)
MySQL doesn't use that index for this query:
SELECT * FROM Recipe
WHERE Title LIKE '%cake%';
I used the EXPLAIN
keyword and the key field is NULL
.
How to solve it? I have to improve that query.