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

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 temp table or physical table

Author  Topic 

ajith_ad
Starting Member

3 Posts

Posted - 2012-03-20 : 01:46:56
I have a complex join query in my SP. I ahave select into statement .
First I am getting result into a temparay table(not # table) and then updating the orginal table. I am using
Select Distinct Result.* into ABC.
I thought of using Select Distinct Result.* into #ABC(using temp table).

Which one will be the better choice in performance?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-03-20 : 02:04:04
Use #ABC, with permanent table you may have problems if the procedure is called simultaneouly by many users

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-20 : 02:04:47
can you post the code?

The use of temp tables is way over abused

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -