Repository navigation
Limit the online full-order case to clustered columnstore indexes - #10462
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 a1dd868: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
🟡 Changes recommended
Update the spill-location explanation to match the revised clustered online-build guidance.
1 open issue
What changed in this PR
This pull request updates the ordered columnstore index documentation to limit the online full-order guarantee to clustered columnstore indexes.
Changes:
- Restricts the
ONLINE = ONandMAXDOP = 1full-order case to clustered columnstore indexes. - Removes the
ONLINE = OFFrequirement when the build fits in query workspace memory. - Leaves the accompanying spill-location explanation inconsistent with the revised guidance.
| File | Summary |
|---|---|
docs/relational-databases/indexes/ordered-columnstore-indexes.md |
Updates the order-type prerequisites for clustered online builds and memory-fitting builds. The spill-location explanation still requires correction. |
Review effort: Lite
| | `MAXDOP = 1`, and the data to sort fully fits in the query workspace memory | Full | | ||
| | All other cases | Partial | | ||
|
|
||
| In the first case when both `ONLINE = ON` and `MAXDOP = 1`, the sort isn't limited by the query workspace memory because an online build of an ordered columnstore index uses the `tempdb` database to spill the data that doesn't fit in memory. This approach can make the index build process slower due to the additional `tempdb` I/O, and requires sufficient free space in `tempdb`. However, because the index build is performed online, queries can continue using the existing index while the new ordered index is being built. |
There was a problem hiding this comment.
#reject: the paragraph below the table is corrected in #10456.
There was a problem hiding this comment.
Rudi Bruchez (@rudi-bruchez) given that there are two related changes, they should be made and published together on a single PR. Can you please close one and continue with the other?
|
William Assaf MSFT (@WilliamDAssafMSFT) Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |

What's wrong
In
ordered-columnstore-indexes.md, the "Order type" table says thatONLINE = ONandMAXDOP = 1give a full order, for any ordered columnstore index. What's new in columnstore indexes describes the improved sort quality for ordered clustered columnstore indexes only, and that's what I measured: an ordered nonclustered columnstore index built online withMAXDOP = 1is limited by the query workspace memory, like an offline build.Evidence
SQL Server 2025 CU7 (17.0.4065.4), Enterprise Developer, Linux container. Fresh database, 7,805,406 rows from a heap whose physical order is unrelated to the order column. The memory grant is set with a Resource Governor workload group (
REQUEST_MAX_MEMORY_GRANT_PERCENT) and read from thequery_memory_grant_usageevent.Observed order quality of the order column (8 to 15 segments):
An online nonclustered build with a large grant and an offline build that fits in memory both give a full order, so the second row of the table no longer needs
ONLINE = OFF.Change
The first row now reads "Clustered columnstore index,
ONLINE = ON, andMAXDOP = 1", and the second row dropsONLINE = OFF. The paragraph after the table is left as is: #10456 corrects where an online build spills.