Transact-SQL Reference

SET STATISTICS PROFILE

Displays the profile information for a statement. STATISTICS PROFILE works for ad hoc queries, views, triggers, and stored procedures.

Syntax

SET STATISTICS PROFILE { ON | OFF }

Remarks

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
Executes Number of times the operator has been executed

Permissions

SET STATISTICS PROFILE permissions default to all users.

See Also

SET

SET SHOWPLAN_ALL

SET STATISTICS TIME

SET STATISTICS IO