I have been experimenting with Redis and MongoDB lately and it would seem that there are often cases where you would store an array of id\'s in either Mongo
Using IN with a large parameter set on a large list of records will in fact be slow.
In the case that I solved recently I had two where clauses, one with 2,50 parameters and the other with 3,500 parameters, querying a table of 40 Million records.
My query took 5 minutes using the standard WHERE IN. By instead using a subquery for the IN statement (putting the parameters in their own indexed table), I got the query down to TWO seconds.
Worked for both MySQL and Oracle in my experience.