Statistics

SQL Server 2000 still supports both the SET STATISTICS IO option and the SET STATISTIC TIME option, which will display the actual logical and physical page reads incurred by a query and the CPU and elapsed time, respectively. These two SET options return actual execution statistics, as opposed to the estimates returned by the Query Analyzer and the two showplan options discussed in the previous section. These two tools are invaluable for determining the actual query impact.

The SET STATISTICS PROFILE option is also provided to display execution plan information while still allowing the query to run.

STATISTICS PROFILE

The SET STATISTICS PROFILE option returns the same textual information that is displayed with the SET SHOWPLAN_ALL ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.