I have a query that looks something like:
SELECT ID from query_1 WHERE ID IN (SELECT ID FROM query_2 WHERE some_condition) OR ID NOT IN (SELECT ID FROM cached_query_2)
query_2 takes a while to execute and I would like to use the cached result of the previous call (from the first subquery).
What result is used when I use the cached_query in the last row? Is it the result from the time the query was executed by the first subquery, or some other older result? Thank you.