Skip to content

-

The topic describes the EX0017 analysis rule.

EX0017: Generate ALTER INDEX statements for rebuilding or reorganizing fragmented indexes.

Section titled “EX0017: Generate ALTER INDEX statements for rebuilding or reorganizing fragmented indexes.”

Generate ALTER INDEX statements for rebuilding or reorganizing fragmented indexes.

The rule identifies fragmented indexes and generates ALTER INDEX statements for rebuilding or reorganizing those indexes.

Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. Heavily fragmented indexes can degrade query performance and cause your application to respond slowly.

You can remedy index fragmentation by either reorganizing an index or by rebuilding an index. For partitioned indexes built on a partition scheme, you can use either of these methods on a complete index or on a single partition of an index.

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

NameDescriptionDefault Value
MaximumAllowedFragmentationMaximum allowed fragmentation for an index that to be ignored by the rule.10
MinimumPagesCountMinimum number of pages an index must have in order to be considered by the rule.10
MaximumFragmentationForReorgainizeIndexMaximum fragmentation percent below which index reorganization will be suggested by the rule. Above this specified percent, rebuilding of the index will be suggested.30

Explicit Rules

There is no additional info for this rule.

Analysis Rules