Temporary Tables in Stored Procedures

Posted by Paul White on SQL Blog See other posts from SQL Blog or by Paul White
Published on Tue, 14 Aug 2012 15:22:00 GMT Indexed on 2012/08/27 21:51 UTC
Read the original article Hit count: 398

Ask anyone what the primary advantage of temporary tables over table variables is, and the chances are they will say that temporary tables support statistics and table variables do not. This is true, of course; even the indexes that enforce PRIMARY KEY and UNIQUE constraints on table variables do not have populated statistics associated with them, and it is not possible to manually create statistics or non-constraint indexes on table variables. Intuitively, then, any query that has alternative execution...(read more)

© SQL Blog or respective owner

Related posts about procedures

Related posts about query plans