SQL Server Management Studio, how to get execution time down to milliseconds
Turn on Client Statistics by doing one of the following:
- Menu: Query > Include client Statistics
- Toolbar: Click the button (next to Include Actual Execution Time)
- Keyboard: Shift-Alt-S
Then you get a new tab which records the timings, IO data and rowcounts etc for (up to) the last 10 exections (plus averages!):
What you want to do is this:
set statistics time on
-- your query
set statistics time off
That will have the output looking something like this in your Messages window:
SQL Server Execution Times: CPU time = 6 ms, elapsed time = 6 ms.
I was struggling with that until i found this...
http://blog.sqlauthority.com/2009/10/01/sql-server-sql-server-management-studio-and-client-statistics/
Also, if you open the Properties window you may find some magical "Connection elapsed time" that may give you some execution time... Hope it helps...