Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    8

    Unanswered: get time of querry??

    is there a way to get the time that it takes a querry to run like down to the millsecond

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    on 2005 you can use this timer class mladen wrote:

    http://weblogs.sqlteam.com/mladenp/a.../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.

  3. #3
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by SoftwareSoftware
    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
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •