We have already introduced many tools that can be used to get data on processing operations, using trace, performance counters, and dynamic management views. The same tools can also be used to monitor query performance, and in this section we'll see how this can be done.
Regardless of the tool we use to collect it (SQL Server Profiler, ASTrace, XMLA, or Flight Recorder), trace data is the most important source of information on query-related operations. Trace data provides information on the internal operations of the Storage Engine and the Formula Engine, for example, showing if aggregations are used or not, and if calculations are evaluated in bulk mode or not.
The most important trace events for analyzing query performance are as follows (once again, the integer identifier for each event is shown in parentheses after its name):
Progress Report Begin(
Progress Report End(
6): There is only one subclass event that is relevant...