I have 2 sql queries. The 2nd one is a modified version of the 1st one and there only little difference between them.
I want to know the execution time of both sqls, so I gave like
--Query 1
set statistics time on
Select...
.........
set statistics time off
--Result
(2 row(s) affected)
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 39 ms.
--Query 2
set statistics time on
Select...
.........
set statistics time off
--Result
(2 row(s) affected)
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
For the 2nd Query, the elapsed time is 0 ms, It should be some where around the execution time of 1st sql. It gave 0 ms ,just because I executed [Query 1] before [Query 2]. How can I view the elapsed time of 2nd query, should I delete statistics or any thing?