Multiple value subquery
Hi
I'm trying to simplify this so it's easy to explain but will probably end up confusing the question. Here goes.
I have a multi table query that needs to return values based on table_n.column being in a list of values.
This list of values is flexible and obtained via a separate query containing Union's. The list currently contains 100+ values.
If I run the query to obtain the list of values, then copy the result into the first query as a giant IN ('1', '2', '3',...) I get rows returned in seconds.
I'd obviously rather merge the two so that I'm not manually running this - in two steps.