If you're fetching several resultsets that contain a lot of common data, it can make sense to obtain a single resultset that has all the data that's required, store it in a temporary table, and then select from this temporary table as needed.
Full story »