Home All Groups Group Topic Archive Search About

how to determine how many milliseconds a segment of code takes to execute in TSQL on sql server 2005

Author
31 Oct 2007 10:10 PM
DR
how to determine how many milliseconds a segment of code takes to execute in
TSQL on sql server 2005?

Author
31 Oct 2007 11:26 PM
Erland Sommarskog
DR (softwareengineer98***@yahoo.com) writes:
> how to determine how many milliseconds a segment of code takes to
> execute in TSQL on sql server 2005?

You can use Profiler or a server side trace, which permits your collect
duration on microsecond level. Just beware than in Profiler there is an
option on whether to display duration in microseconds or milliseconds,
and milliseconds is the default.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Author
1 Nov 2007 1:32 AM
Mike C#
Answered in .programming and the other groups where this was posted.

Show quote
"DR" <softwareengineer98***@yahoo.com> wrote in message
news:%23OCFcrAHIHA.5544@TK2MSFTNGP02.phx.gbl...
> how to determine how many milliseconds a segment of code takes to execute
> in TSQL on sql server 2005?
>

AddThis Social Bookmark Button