How to tune a stored procedure?

Answer Posted / arindam choudhury

suppose the query is correct in astored procedure then
1)we need to use tablename with (nolock) in our select
statements so that it does not create delay if other person
is updating the table at the same time it will show last
updated table recordset
2)if we dont need that much the database server to return
the number of records affected after executing any dml
statements which actually reduces the performance ,we can
use set nocount on -set nocount off before and after
writing the sql query,
3)wecan create lesser join statements if we can use
subqueries

these are the few steps to tune stored procedure

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create an multi-statement table-valued function?

534


Can we write ddl in trigger?

501


What is the library index called?

605


How can you find out which stored procedures are recompiling?

524


What is named calculation? : sql server analysis services, ssas

542






how you can configure a running aggregate in SSRS?

118


why would you call update statistics? : Sql server database administration

590


What is the status of services on passive node for failover cluster in sql server? : sql server database administration

641


How can I add Reporting Services reports to my application?

91


When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?

509


What is relationship? What number of sorts of relationship are there?

646


What is a view in sql?

586


what are the new features introduced in sql server 2000? : Sql server database administration

552


How do I edit a stored procedure in sql server?

516


What is a transaction and why is it important?

579