Results from Subqueries

  • Where are the results from subqueries stored? Are temp tables in tempdb created? I have not been able to find any documentation regarding this...thank!

  • It depends on what the query engine decides. If it may be lengthy and not fit in memory it will write out to a tabl in TempDB. If it can survive in memory it will remain memory resident and attached too. Other conditions of the query engine trying to optimize putting the data together may cause it to use tempdb.

  • Subquery Results are In Memory !

    You would have to look at the execution plans of each for further insight


    * Noel

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply