SA0045 : Consider updating statistics as they appear outdated and may mislead the query optimizer
The topic describes the SA0045 analysis rule.
Consider updating statistics as they appear outdated and may mislead the query optimizer
The rule checks the statistics on all tables and indexed views in the current database for outdated statistics.
Evaluation of the statistics can be based on the number of modified rows or on the last time the statistics were updated.
The rules used to evaluate the statistics using the number of modified rows are the same as the rules SQL Server uses to update statistics automatically.
These rules are as follows:
– If a table has 6 or fewer rows, statistics will be updated after 6 changes
– If a table has 500 or fewer rows, statistics will be updated after 500 changes
– If a table has more than 500 rows, statistics will be updated after 20% of the total rows plus 500 rows are modified,added or deleted
Consider updating statistics of the reported table as they appear outdated.
The rule has a ContextOnly scope and is applied only on current server and database schema.
The parameters specifies the rules used to evaluate the statistics and consider them outdated or not.
Number of days the after which statistics are considered outdated. The parameter is used only when the EvaluationMode is set to Period or Any.
The rule requires Analysis Context. If context is missing, the rule will be skipped during analysis.
Performance Rules, Maintenance Rules, Bugs
There is no additional info for this rule.