Comment Comment by anshul You might want to test using the first query as a sub-query or cte in the second one. That would likely give you the same / better perf. It would avoid the join and save a round trip. parent anshul 4 years ago