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
 General SQL Server Forums
 New to SQL Server Programming
 stored proc help pls...

Author  Topic 

kumar.sqldba
Starting Member

6 Posts

Posted - 2007-08-13 : 01:44:19
Hi All

Before tuning the stored proc. What are the things I have to look at?
How can I tune better?

Thanks in advance...

Waiting for your replay....

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2007-08-13 : 05:13:28
The below link will help you.

http://www.sql-server-performance.com/tips/stored_procedures_p1.aspx

In short:
Use table variable over temp tables.
Avoid usage of cursor.
Avoid like '%b%' search where ever possible
Ex: Select * from emp where ename like '%smith%'

There is lot you can find on the link..

Place the below statement on the top of stored procedure body.
SET NOCOUNT ON

Go to Top of Page
   

- Advertisement -