Monday, March 12, 2012

get time of querry?

is there a way to get the time that it takes a querry to run like down to the millsecondon 2005 you can use this timer class mladen wrote:

http://weblogs.sqlteam.com/mladenp/archive/2006/12/02/39124.aspx

otherwise you can use the datediff, etc functions in sql server for timing. This won't give you ms accuracy though, since the clock in sql server only has 3ms resolution. perhaps that's enough for you though.|||is there a way to get the time that it takes a querry to run like down to the millsecond

Use SQL Profiler. The duration columns records the time it takes to run a query down to the ms.

Or use SET STATISTICS TIME ON

Or are you trying to access this info programmatically?

Regards,

hmscott

No comments:

Post a Comment