Specifies the name of the table to create the statistics on.
The index to create the statistics on. If no index is specified, the statistics are created for all indexes in the table.
Specifies that all rows in the table or view should be read to gather the statistics.
Specifies that automatic recomputation of the statistics should be disabled. If this option is specified, the Database Engine continues to use old statistics even as the data changes. The statistics are not automatically updated and maintained by the Database Engine, which can produce suboptimal plans.
Important We recommend that this option be used rarely, and only by a trained system administrator.
CREATE TABLE MyCustomers (CustID int, CompanyName nvarchar(50));
CREATE UNIQUE INDEX idxCustId ON MyCustomers (CustId);
DROP STATISTICS ON MyCustomers.idxCustId;
CREATE STATISTICS ON MyCustomers.idxCustId WITH FULLSCAN, NORECOMPUTE;
Was this page helpful?
Your feedback about this content is important. Let us know what you think.
1500 characters remaining
We appreciate your feedback.
Have a suggestion to improve MSDN Library?
Visit our UserVoice Page to submit and vote on ideas!