Displays or changes the automatic UPDATE STATISTICS setting for a specific index and statistics, or for all indexes and statistics for a given table or indexed view in the current database.
Examples
A. Display the current status of all indexes for a table
This example displays the current statistics status of all indexes on the authors table.
USE pubs
EXEC sp_autostats authors
B. Enable automatic statistics for all indexes of a table
This example enables the automatic statistics setting for all indexes of the authors table.
USE pubs
EXEC sp_autostats authors, ‘ON’
C. Disable automatic statistics for a specific index
This example disables the automatic statistics setting for the au_id index of the authors table.
USE pubs
EXEC sp_autostats authors, ‘OFF’, au_id
REFERENCE : MSDN Library