SET STATISTICS IO
adds I/O counters per table to messages
What changes
- Input
- none
- Output or change
- session state
Syntax at a glance
SET STATISTICS IO { ON | OFF }
Work example
A tuning review needs the measurement supplied by SET STATISTICS IO 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 IO. The SET STATISTICS IO 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.