Causes Microsoft® SQL Server™ to display information regarding the amount of disk activity generated by Transact-SQL statements.
SET STATISTICS IO {ON | OFF}
When STATISTICS IO is ON, statistical information is displayed. When OFF, the information is not displayed.
After this option is set ON, all subsequent Transact-SQL statements return the statistical information until the option is set to OFF.
There are five output items.
Output item | Meaning |
---|---|
table | Name of the table |
scan count | Number of scans performed |
logical reads | Number of pages read from the data cache |
physical reads | Number of pages read from disk |
read-ahead reads | Number of pages placed into the cache for the query |
The setting of SET STATISTICS IO is set at execute or run time and not at parse time.
SET STATISTICS IO permissions default to all users.
SET SHOWPLAN_ALL | SET |
SET STATISTICS TIME |