Stored Procedure Performance Tuning

How can we improve stored procedure performance? Explain the performance tuning techniques.

Questions by MUNNU2U   answers by MUNNU2U

Showing Answers 1 - 9 of 9 Answers

cybersavvy

  • Feb 19th, 2009
 

1.  Use many WHERE clauses in the SELECT  statments.
2.  Select only those fields which you really require.
3.  Joins are expensive in terms of time. Join the tables using related fields manly indexed fields.
4.  Don't use unused tables.

To expect improvemnt in stored procedure performance, pl keep following points in mind :-

1. Please don't use many subqueries.
2. Don't use cursor, instead of it, use temp. table in the looping.
3. Drop/release objects whichever created and used in that proc block.

These are few additiond from my side..

  Was this answer useful?  Yes

hiteshvyas

  • Apr 21st, 2010
 

Use the following steps:
1) Dont use temporary tables instead use CTE or table Variable
2) Use Inner Join instead of Sub Queries.
3) Check indexs in tables used
4) Instead of Select * from use select column1,column2.
5) Use Query Execution plan to check time taken for query to get executed.

These are few things that can be followed for better performance

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions