Table Variable Vs. Temp Table
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 …