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 2000 Forums
 SQL Server Development (2000)
 Improving Performance Tips for Dynamic SQL in SP

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-23 : 14:25:07
Eli writes "Hello ,
My name is Eli Leiba and I am an SQL-SERVER DBA consultant for some Startup companies.

My question concerns dynamic SQL:

How can I improve perfomance for a stored procedure that does mainly dynamic SQL
LIKE: exec 'declare cursor.......' , exec 'update t_' + convert(varchar,id) + 'set .....' etc
the names of the tables are given as parameters to the SP and that cannot be changed.

I tried using sp_executesql and dividing the Stored procedure to little ones to reduce recompilation overhead. Can I do something else too?

Thanks ,

Eli"
   

- Advertisement -