Print query duration/run time in results

  • I am looking for a way to add the query execution time to the result of the query. This is not a big deal, but if anyone knows of a setting in query analyzer or an SP or routine for adding this, I would greatly appreciate it. Thanks in advance.

    Jeff

  • Is this for the final application or for query optimization??

    SET STATISTICS TIME ON

    Select * from dbo.SysObjects

    SET STATISTICS TIME OFF

    check the message window.

  • Thank you. This was exactly what I needed.

    Jeff

  • HTH.

    check out SET STATISTICS IO too .

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply