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.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Temp table / Table variable
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Aged Yak Warrior

503 Posts

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


United Kingdom
12543 Posts

Posted - 03/30/2005 :  18:12:33  Show Profile  Visit nr's Homepage
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
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000