We all familiar to the 'Duration' field in the profiler,
But not all of us aware that 'Duration' includes the waits + CPU time,
Meaning it also includes the time it takes to transfer the result set
to an application over the network. However the CPU time, it's the amount
of CPU time it took to complete the query.
Let`s make it visual, suppose we have SQL Server and in one case an application
in same network and in other case the application installed in another network.
And our application executes same SP. If the network B has slow connection to
Our SQL Server we will see that the duration in the SQL Profiler in case of Network A
Will be different that the duration in Network B, but the CPU time will be similar in
Also pay attention to the duration units.
In Profiler, the duration is represented as milliseconds (1 sec = 1000 ms),
But I saved trace file in the duration is represented
As microseconds (1 sec = 1000000 μs).