I’ve been working with MySQL lately and was really surprised that it can’t do simple IN queries using a table as the IN recordset. By that, I mean that the way MySQL works the queries can take an inordinate amount of time to complete. One of these that I tried was later identified by the very system we’re writing as being a long running query (it had been running for over a day.) Fortunately you can write them using an inline table instead.
select stuff from OutsideTable where id in (select id from InsideTable);
select ot.stuff from OutsideTable ot, (select id from InsideTable where something='value') it where ot.id=it.id;
Well, at least I could make it work.
(Oh, I didn’t run these queries, they’re just there to make the point).