Database Reference
In-Depth Information
Statistics tab, and a column aggregating the multiple executions shows the averages for the data collected.
The statistics will also show whether a time or count has changed from one run to the next, showing up as arrows,
as shown in Figure 7-13 . For example, consider this query:
SELECT TOP 100
p.*
FROM Production.Product p;
The client statistics information for the query should look something like that shown in Figure 7-13 .
Figure 7-13. Client statistics
Although capturing client statistics can be a useful way to gather data, it's a limited set of data, and there is no
way to show how one execution is different from another. You could even run a completely different query, and its
data would be mixed in with the others, making the averages useless. If you need to, you can reset the client statistics.
Select the Query menu and then the Reset Client Statistics menu item.
Execution Time
Both Duration and CPU represent the time factor of a query. To obtain detailed information on the amount of time
(in milliseconds) required to parse, compile, and execute a query, use SET STATISTICS TIME as follows:
SET STATISTICS TIME ON
GO
SELECT soh.AccountNumber,
sod.LineTotal,
sod.OrderQty,
sod.UnitPrice,
p.Name
 
Search WWH ::




Custom Search