displaying execution plans in profiler

  • 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?

  • 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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • 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