Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Temp table / Table variable

Author  Topic 

Aged Yak Warrior

503 Posts

Posted - 2005-03-30 : 16:39:03
Is there any performance difference between using a Temp table and using a Table variable?


12543 Posts

Posted - 2005-03-30 : 18:12:33
A variable takes less resources to create but gives less optimisation options less indexing possibilities and you also can't detect it's existence or size from another spid.
So table variables are usually used for small tables and temp tables for large ones.

Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

- Advertisement -