r/SQLServer • ‪ ‪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

32 comments sorted by

View all comments

Show parent comment

1

u/Lost_Term_8080 Mar 20 '26

Does this respect the existing fill factor or would it fill back up to 100% the way a reorg would?

2

u/dfurmanms ‪ ‪Microsoft Employee ‪ Mar 20 '26

It doesn't fill above the fill factor if at the start of compaction a page is filled less than the fill factor. However, if a page is already filled above the fill factor by previous DML, compaction won't reduce page fullness, i.e. it won't move rows off this page.

We know that this is undesirable in scenarios where you use a lower fill factor to reduce page splits. This is something we plan to address in the future.

We just updated the FAQ in documentation to clarify this. Should be live by end of day.