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 Administration
 help with analyzing traces

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2011-11-18 : 04:42:20
I am trying to figure out what makes my cpu peak to 100%

the issue is when I analyze the trace the things using the most cpu show a textdata of null -- so how can I know what is causing the issue?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-18 : 13:17:35
Ignore those. I always add WHERE TextData IS NOT NULL to my query when analyzing a trace.

So now what's at the top for CPU?

Here's where I start:

select top 1000 Duration/1000.0 as DurationMs, TextData
from TraceFile
where TextData is not null
order by Duration desc


select top 1000 Reads, TextData
from TraceFile
where TextData is not null
order by Reads desc


select top 1000 CPU, TextData
from TraceFile
where TextData is not null
order by CPU desc


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-18 : 13:36:12
You are likely going to find a scan is causing your CPU issue. You are almost certainly missing a critical index. Have you run the missing indexes report yet? Any with an extremely high Impact value?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2011-11-19 : 10:38:45
Have you run the missing indexes report yet? Any with an extremely high Impact value?

can you give me a link to more on info on how I can scan for this?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-19 : 15:25:58
Target the ones with with over 10,000,000 for impact. Start with the very highest though. Make sure you don't add so called duplicates. Proceed with caution of course!

http://sqlserverpedia.com/wiki/Find_Missing_Indexes

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -