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 Administration (2000)
 The Top Ten slow procedures

Author  Topic 

joni
Yak Posting Veteran

50 Posts

Posted - 2006-10-11 : 14:38:28
Hi Gurus,

I would like to know how can I see the top ten slow stored procedure in my sistem? I have SQL Server 2000.

Thank´s in advanced,

Joni

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-10-11 : 14:50:31
run profiler for a while and then you can export the results into a table and query against it.

with just a select it's not possible AFAIK.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

joni
Yak Posting Veteran

50 Posts

Posted - 2006-10-11 : 14:55:52
OK, thank´s...Can I say that a procedure is slow loking just the duration or I need see any field more.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-10-11 : 14:57:17
add start and end time, but duration should be enough.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

joni
Yak Posting Veteran

50 Posts

Posted - 2006-10-11 : 15:22:31
thank´s for help
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-10-11 : 15:40:47
Once you have the trace results saved to a table, do this to get the slowest 10 queries:

SELECT TOP 10 Duration, TextData
FROM YourTraceTableName
WHERE TextData IS NOT NULL
ORDER BY Duration DESC

Tara Kizer
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2006-10-11 : 15:53:28
And you can always use ClearTrace for this: http://www.cleardata.biz/cleartrace/default.aspx

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

joni
Yak Posting Veteran

50 Posts

Posted - 2006-10-11 : 16:34:02
thank´s folks
Go to Top of Page
   

- Advertisement -