You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,9 +76,9 @@ While the overhead of the compaction process is minimal, it's not zero. When you
76
76
77
77
Automatic index compaction is part of the background [persistent version store (PVS)](../accelerated-database-recovery-concepts.md#adr-recovery-components) cleaner process. This process periodically removes obsolete row versions from data pages. If you enable automatic index compaction for the database, the PVS cleaner also compacts indexes.
78
78
79
-
As the cleaner visits each page with the recently inserted, updated, or deleted rows, it checks the free space on the current page and the used space in several of the following pages. If there's enough free space on the current page, the cleaner moves rows from the following pages to the current page if that action makes at least one of the following pages empty.
79
+
As the cleaner visits each page with recently inserted, updated, or deleted rows, it checks whether the current page has free space available, excluding the free space reserved by the fill factor. If so, the cleaner moves rows from the next page to the current page as long as they fit into the free space. This process then advances forward and repeats for a small number of consecutive page pairs following the page being cleaned.
80
80
81
-
Empty pages are deallocated. As a result, the total number of used pages in the database decreases, [page density](reorganize-and-rebuild-indexes.md#concepts-index-fragmentation-and-page-density) increases, and the consumption of storage space, disk I/O, CPU, and buffer pool memory is reduced.
81
+
If a page becomes empty after its rows are moved, it is deallocated. As a result, the total number of used pages in the database decreases, [page density](reorganize-and-rebuild-indexes.md#concepts-index-fragmentation-and-page-density) increases, and the consumption of storage space, disk I/O, CPU, and buffer pool memory is reduced.
82
82
83
83
The following diagram shows a conceptual view of data pages in an index before and after compaction.
84
84
@@ -92,7 +92,7 @@ The compaction process might skip some pages because of concurrent activity, suc
92
92
- An index build or reorganization in progress.
93
93
- A shrink operation in progress.
94
94
- A large PVS size or a large number of aborted transactions to clean up from PVS.
95
-
- PVS cleanup is prioritized over automatic compaction. Compaction is suspended if PVS size exceeds 150 GB, or if the number of aborted transactions exceeds 1,000.
95
+
- PVS cleanup is prioritized over automatic compaction. Compaction is suspended if PVS size is 150 GB or greater, or if the number of aborted transactions is 1,000 or greater.
96
96
97
97
For less common reasons why the compaction process might skip pages, see [Use an extended event to monitor compaction statistics](#use-an-extended-event-to-monitor-compaction-statistics).
98
98
@@ -184,7 +184,7 @@ If a query is blocked, check the command of the head blocker in [sys.dm_exec_req
184
184
185
185
### Does it honor the fill factor?
186
186
187
-
Auto compaction never fills a page above the [fill factor](specify-fill-factor-for-an-index.md). However, if a page is already filled above the fill factor by the previous DML statements, then compaction doesn't reduce page density. Pages might remain filled above the fill factor after compaction.
187
+
Auto compaction doesn't use the free page space reserved by [fill factor](specify-fill-factor-for-an-index.md). However, if that reserved space is already used by the previous DML statements, then compaction doesn't free it up.
188
188
189
189
### Does it work if an index uses row or page compression?
0 commit comments