-
Introduction
Section titled “Introduction”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.”Message
Section titled “Message”Generate ALTER INDEX statements for rebuilding or reorganizing fragmented indexes.
Description
Section titled “Description”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.
Parameters
Section titled “Parameters”| Name | Description | Default Value |
|---|---|---|
| MaximumAllowedFragmentation | Maximum allowed fragmentation for an index that to be ignored by the rule. | 10 |
| MinimumPagesCount | Minimum number of pages an index must have in order to be considered by the rule. | 10 |
| MaximumFragmentationForReorgainizeIndex | Maximum fragmentation percent below which index reorganization will be suggested by the rule. Above this specified percent, rebuilding of the index will be suggested. | 30 |
Categories
Section titled “Categories”Explicit Rules
Additional Information
Section titled “Additional Information”There is no additional info for this rule.