Temp Table vs Table Variable vs CTE and the use of TEMPDB.
For more information on Common Table Expessions and performance, take a look at my book at Amazon.com: Common Table Expressions Joes 2 Pros®: A CTE Tutorial on Performance, Stored Procedures, Recursion, Nesting and the use of Multiple CTEs There are many reasons that a Temp Table, Table Variable or Common Table Expression can be a good solution, but there is …
Temp Table vs Table Variable vs CTE and the use of TEMPDB. Read more »