Home All Groups Group Topic Archive Search About
Author
28 Jul 2006 5:19 PM
Mark Goldin
Would it be possible to monitor for a few days every query's execution and
collect the longest execution time (just that) for each different query?

Thanks

Author
28 Jul 2006 6:09 PM
Arnie Rowland
You can run a profile trace, capturing the output in a SQL Server
database/table -but not the server you are monitoring. If you have a lot of
traffic, the table can get very large very fast. Use the appropriate
Template. TSQL_Duration is a good choice for a Template to use.

Then you can sort through the captured data in the table isolating the
longest running queries.

You wouldn't be able to easily "collect the longest execution time (just
that) for each different query". How would the system know if any particular
execution will be the longest one until the collect period is finished?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
"Mark Goldin" <mgol***@ufandd.com> wrote in message
news:%23Hw18nmsGHA.4728@TK2MSFTNGP05.phx.gbl...
> Would it be possible to monitor for a few days every query's execution and
> collect the longest execution time (just that) for each different query?
>
> Thanks
>

AddThis Social Bookmark Button