As far as I know, mysql does not use index when using IN (1, 2 ... n) queries. Am I mistaken? Or can I do something to make mysql use it? I do not mean optimizing the IN () subquery, as this is clearly explained in the manual.
Example (assuming index_abc is specified for all fields):
WHERE a = 1 AND b = 2 AND c = 3 - then it uses index_abc
WHERE a = 2 AND b IN (2, 4, 5) AND C = 3 - then this is not
Thanks in advance for your help.
source share