Repository navigation
Say that an index rebuild can clear missing index requests - #10465
Rudi Bruchez (rudi-bruchez) wants to merge 1 commit into
Conversation
|
Rudi Bruchez (@rudi-bruchez) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 9deb3a7: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
🟢 Approval recommended
The documentation change accurately narrows the behavior from all index operations to index rebuilds.
No open issues 🎉
What changed in this PR
Updates the missing-index documentation to clarify that an ALTER INDEX ... REBUILD operation can clear missing-index requests, rather than implying that every ALTER INDEX operation does so.
Changes:
- Replaces the overly broad statement about all
ALTER INDEXoperations. - Specifies index rebuilds as the operation that can clear requests.
| File | Description |
|---|---|
docs/relational-databases/indexes/tune-nonclustered-missing-index-suggestions.md |
Clarifies when rebuilding an index can clear missing-index requests. |
Review effort: Lite
What's wrong
In
tune-nonclustered-missing-index-suggestions.md, section "Missing index suggestions are cleared", the page says: "Performing an ALTER INDEX operation on an index on a table also clears missing index requests for that table." In the test below, a rebuild cleared the suggestion.ALTER INDEX ... REORGANIZE,SET (...)andDISABLEleft the tested suggestion in place, even when the reorganization removed almost all the fragmentation of the index.Evidence
SQL Server 2025 CU7 (17.0.4065.4) and CU10 (17.0.5035.5), SQL Server 2022 CU27-GDR (16.0.4305.5), Developer, Linux containers. Fresh database.
Observed (2025 CU7; the other builds give the same suggestion counts):
On 2025 CU7, with the suggestion generated again before each step:
ALTER INDEX ... SET (ALLOW_PAGE_LOCKS = OFF),ALTER INDEX ... DISABLE,ALTER INDEXon the clustered primary key withREORGANIZEandALTER INDEX ALL ... REORGANIZEkeep the suggestion;ALTER INDEX ... REBUILD WITH (ONLINE = ON)clears it.Change
Replaces "Performing an ALTER INDEX operation on an index on a table also clears" with "Rebuilding an index on a table with ALTER INDEX can also clear".