r/SQLServer • u/dfurmanms Microsoft Employee • Mar 18 '26
Community Share Introducing Automatic Index Compaction
We just released a MSSQL engine feature that might just make the whole index maintenance debate obsolete (or should at least make it less boring). Auto index compaction is now in public preview in Azure SQL and Fabric SQL.
Announcement blog: Stop defragmenting and start living: introducing auto index compaction.
Documentation (with an FAQ): Automatic Index Compaction | Microsoft Learn.
Would you use this instead of your own index maintenance? Tell us what you think.
55
Upvotes
View all comments
Show parent comment
2
u/dfurmanms Microsoft Employee Mar 19 '26
There is no analysis or other compaction-related activity at insert time or during any other DML. In fact, there isn't any analysis that examines the entire table. Each compaction attempt only looks at a few recently modified pages.
But point taken, it's pointless to do any compaction work for data that is transient and will be deleted or reloaded soon anyway.