Temporary Object Caching Explained

Posted by Paul White on SQL Blog See other posts from SQL Blog or by Paul White
Published on Thu, 16 Aug 2012 21:51:00 GMT Indexed on 2012/08/27 21:50 UTC
Read the original article Hit count: 213

Filed under:
SQL Server 2005 onward caches temporary tables and table variables referenced in stored procedures for reuse, reducing contention on tempdb allocation structures and catalogue tables.  A number of things can prevent this caching (none of which are allowed when working with table variables): Named constraints (bad idea anyway, since concurrent executions can cause a name collision) DDL after creation (though what is considered DDL is interesting) Creation using dynamic SQL Table created in a...(read more)

© SQL Blog or respective owner