Performance tuning a stored proc | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Performance tuning a stored proc

We have a stored proc which takes data from a database D1 (multiple tables) and inserts it into a temporary table variable. (DECLARE @Table TABLE( …. )
Then we insert the data from this @Table and insert it into different tables in database D2
Finally there is a select statement that does a join on all the tables in D2 and displays it. This proc is timing out quite often and we need to tune it to reduce the timeouts.
Any suggestions?
is it executing faster from Query Analyser —————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
fyi.. too. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.