Friday, September 7, 2012

Query execution time in miliseconds in SQL Server Management Studio

If you need to get query execution time in milliseconds in SQL Server Management Studio, there is a simple way to achieve this.

Just add following commands before and after your query:
set statistics time on 
 
-- your query 
 
set statistics time off 
This will result in following lin in Messages window:
SQL Server Execution Times: CPU time = 16 ms, elapsed time = 16 ms.
Simple as that.

No comments:

Post a Comment