April 29, 2009 at 11:40 pm
Hi,
I am running a trace to get execution plans on my server. There are quite a few - How can I take a decide the best ones to look at? I thought basing on duration in profiler would be best - is that right?
April 30, 2009 at 6:21 am
Using trace to capture execution plans can be an expensive operation so you need to be very judicious in it's application within a production system. That said, it really depends on what you're trying to measure. You can set a filter so that you only capture events that run longer than some set amount, say 3000ms or 3 seconds. But just getting the longest running queries doesn't always work. You might have query that runs in under a second but is called 90 times in a minute. You may want to spend more time on tuning that query than one that runs for three minutes but is only called once a day.
Generally, I don't capture execution plans with the trace, just to keep the trace as lean as possible. You can query the cache to get an execution plan if you need to, although plans can, do and will age out of cache.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 30, 2009 at 7:10 pm
thanks.. I think that gave me what I needed:-)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply