Performance: MySQL id = vs id IN (multiple values)
I found a similar post here.

I've done some benchmark on all 3 queries on a table with 500,000 records with index on id. I fetched 10,000 rows. I did the same tests on MyISAM and Innodb, all same results. I made sure that for each query I used different set of numbers, so the query is not cached by MySQL. I did the tests multiple times, and I got similar numbers every time.

Benchmark results (average):


Query 1, fetch by = OR =: 3.700 seconds
Query 2, fetch by IN: 0.037 seconds
Query 3, fetch by >= &amp;&amp; &lt;=: 0.005 seconds
Query 4, fetch by between: same as >= &amp;&amp; &lt;=