ClearTrace Supports Statement Level Events
Posted
by Bill Graziano
on SQL Team
See other posts from SQL Team
or by Bill Graziano
Published on Fri, 12 Mar 2010 13:26:42 GMT
Indexed on
2010/03/12
13:37 UTC
Read the original article
Hit count: 324
One of the requests I get on a regular basis is to capture the performance of statement level events. The latest beta has this feature available. If you’re interested in this I’d like to get some feedback.
- I handle the SP:StmtCompleted and the SQL:StmtCompleted events. These report CPU, reads, writes and duration.
- I’m not in any way saying it’s a good idea to trace these events. Use with caution as this can make your traces much larger.
- If there are statement level events in the trace file they will be processed. However the query screen displays batch level *OR* statement level events. If it did both we’d be double counting.
- I don’t have very many traces with statement completed events in them. That means I only did limited testing of how it parses these events. It seems to work well so far though. Your feedback is appreciated.
- If you ever write loops or cursors in stored procedures you’re going to get huge trace files. Be warned.
I also fixed an annoying bug where ClearTrace would fail and tell you a value had already been added. This is a result of the collection I use being case-sensitive and SQL Server not being case-sensitive. I thought I had properly coded around that but finally realized I hadn’t. It should be fixed now.
If you have any questions or problems the ClearTrace support forum is the best place for those.
© SQL Team or respective owner