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)
 performance tuning for a sql statement in a stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-22 : 07:53:04
Kumar writes "I have a stored procedure that needs to be fine tuned. Stored procedure has a set of t-sql statement (2-sql stmts)joined together with UNION to produce results.

CPU READ DURATION
38 1870 78

I will need to reduce READ count atleast if not CPU.

I tried with splitting of SQL stmts into user defined functions and executed from main procedure. This shows no measurable improvement in performance.

There exist a possibility of getting duplicates, so UNION ALL option has been ruled out.

It appears that t-sql statements are already fine tuned. But the problem is the no of hits/minute (150/minute)..

Any thoughts/suggestions?"

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-03-22 : 10:24:00
Have you looked at the execution plan to see if there are any table/index scans? Can you post the code/execution plan?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

SqlStar
Posting Yak Master

121 Posts

Posted - 2005-03-23 : 01:31:04
Kumar,

When will you post your code?

:) While we stop to think, we often miss our opportunity :)
Go to Top of Page
   

- Advertisement -