Every time I do a performance training class I share some stories about those long running reports that I was able to speed up by simply switching a Table Variable (declared with the @ sign) to a Temp Table (declared with the # sign). Today I was working on a batch of TSQL code that took about 8 minutes to …

Table Variable Vs. Temp Table Read more »

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 »