Displays the profile information for a statement. STATISTICS PROFILE works for ad hoc queries, views, triggers, and stored procedures.
SET STATISTICS PROFILE {ON | OFF}
When STATISTICS PROFILE is ON, each executed query returns its regular result set, followed by an additional result set that shows a profile of the query execution.
The additional result set contains the SHOWPLAN_ALL columns for the query and these additional columns.
Column name | Description |
---|---|
Rows | Actual number of rows produced by each operator |
Reuse | Actual number of times this operator was told to reuse its data |
SET STATISTICS PROFILE permissions default to all users.
SET SHOWPLAN_ALL | SET STATISTICS TIME |
SET STATISTICS IO | SET |