MySQL index doesn't help in IN

find1

New Member
If I write this query,\[code\]EXPLAIN SELECT * FROM `smth` WHERE d_id = 9\[/code\]it checks one row instantly. But when I use \[code\]IN\[/code\], for example\[code\]EXPLAIN SELECT * FROM `smth` WHERE d_id IN (9, 3)\[/code\]it checks all rows. What should I do instead of IN if index doesn't help there?
 
Back
Top