[Memo] sp_autostats

  • Post author:
  • Post category:
  • Post comments:0 Comments
  • Post last modified:January 4, 2005

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

Author Details
Kubernetes, DevSecOps, AWS, 클라우드 보안, 클라우드 비용관리, SaaS 의 활용과 내재화 등 소프트웨어 개발 전반에 도움이 필요하다면 도움을 요청하세요. 지인이라면 가볍게 도와드리겠습니다. 전문적인 도움이 필요하다면 저의 현업에 방해가 되지 않는 선에서 협의가능합니다.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments