SET STATISTICS PROFILE
adds an actual plan profile result set
What changes
- Input
- none
- Output or change
- session state
Syntax at a glance
SET STATISTICS PROFILE { ON | OFF }
Work example
A tuning review needs the measurement supplied by SET STATISTICS PROFILE for one read-only query.
Capture a baseline and run the same query and parameters before and after a single change. Turn the setting off when the capture ends.
Check your work SET STATISTICS PROFILE. The SET STATISTICS PROFILE output is tied to the measured query and the setting is off for the next user of the session.
Open Microsoft Learn for full syntax, permissions, and details for your version.