SET STATISTICS TIME
adds parse/compile/execute times to messages
What changes
- Input
- none
- Output or change
- session state
Syntax at a glance
SET STATISTICS TIME { ON | OFF }
Work example
A tuning review needs the measurement supplied by SET STATISTICS TIME 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 TIME. The SET STATISTICS TIME 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.