SA0195 : Duplicate statistics must be removed

The topic describes the SA0195 analysis rule.

Message

Duplicate statistics must be removed

Description

The rule checks current database and reports for automatically created statistics, which duplicate statistics created manually or by index.

Automatically created statistics can become obsolete by subsequent creation of indexes on the same columns.

These duplicate statistics are not removed automatically and will continue to consume resources, be updated and managed by SQL Server until dropped manually.

How to fix

Drop the automatically created statistics that are reported as duplicate by the rule.

DROP STATISTICS schema_name.table_name.statistics_name;

Scope

The rule has a ContextOnly scope and is applied only on current server and database schema.

Parameters

Rule has no parameters.

Remarks

The rule requires Analysis Context. If context is missing, the rule will be skipped during analysis.

Effort To Fix
20 minutes per issue.
Categories

Performance Rules, Bugs

Additional Information

There is no additional info for this rule.

See Also

Other Resources