For example, I have this query:
SELECT * FROM a WHERE field IN (-1, "1")
The above query takes 20 times longer than this one to execute. Why?
SELECT * FROM a WHERE field IN (-1, 1)
Also, in the first case the index is not used, even with USE INDEX
.