Index maintenance · Part 2 of 3

Tidy, but no room

Why REORGANIZE saves hardly any split log records in our insert test – and a REBUILD with reserve achieves much more. Measured on SQL Server 2022 and 2025.

8 October 2026 · approx. 11 minutes

Measured SQL Server 2022 · 2025Maintenance variants 6, three runs eachPlay along 10 questions ↓

The findings in 30 seconds

  1. After REORGANIZE, the index was only 0.28% fragmented. The next 100,000 inserts nevertheless produced 14,870 split log records, after REBUILD with fill factor 81 only 2,632.
  2. REORGANIZE creates no new reserve on full pages. Afterwards, 9.21% of the captured leaf pages had no room left for another row, after the REBUILD none.
  3. The cost depends on the conditions: in our offline comparison, REORGANIZE wrote about 370 times as much log as the REBUILD under SIMPLE, and about 2.4 times as much under FULL.
  4. A low fragmentation value after the job therefore says little about the next insert load. Success is measured against the goal and against the workload that follows.

A green check mark, and the splits continue

Two indexes can be almost free of fragmentation after maintenance and still behave differently on the next inserts. We compare six variants from the same starting state. What matters is whether the pages keep room for the following rows and what the maintenance costs.

This is part 2 of a series. Part 1 explains pages, splits and reserve with pictures instead of measurements; if you know picture 8 from there, you will see the same thing here in numbers. Part 3 asks what an index does when nobody maintains it.

The setup

A table with a GUID as the clustering key and 200 bytes of payload. The keys come from a reproducible, widely spread hash sequence, so new rows hit randomly distributed places in the existing key range. We build one million rows with fill factor 81 and then insert 100,000 rows one at a time. Afterwards the index is 16.69% fragmented. We save this state.

Each maintenance variant starts from exactly this backup:

Maintenance variants of the frozen comparison
VariantWhat happens
No maintenancenothing, control group
Statistics onlyUPDATE STATISTICS … WITH FULLSCAN
REORGANIZEALTER INDEX … REORGANIZE
REBUILD FF81offline and online
REBUILD FF100offline, without reserve

Then another 100,000 single-row inserts follow, the same keys in the same order for every variant. Each comparison runs three times in alternating order, on SQL Server 2022 and 2025 in separate containers. What we measured is a synthetic single index under serial load, not production user latency.

What we count

What REORGANIZE and REBUILD do with the reserve

Fill factor 81 means that about 19% of each leaf page stays free when the index is built. Because only whole rows fit on a page, the measured density after the build is 83.4%, not exactly 81%. This reserve later takes rows that fall into the middle of the page's key range. Once it is used up, SQL Server has to split the page.

After 100,000 randomly distributed inserts, the index looks uneven. Some pages have just been split and are half empty. Others have used up their reserve and are full to the brim.

Schematic

Schematic comparison with the same total reserve

Free space evenly distributednew rowfits30 of 36 slots used, 6 freeFree space unevenly distributednew rowPage full → split30 of 36 slots used, 6 free Free space evenly distributednew rowfits30 of 36 slots used, 6 freeFree space unevenly distributednew rowPage full → split30 of 36 slots used, 6 free
Schematic, not to scale, no measured values: in both cases 30 of 36 slots are used. Whether a new row fits is decided by the page it falls on. The measured states after REORGANIZE and REBUILD also differ in the total amount of reserve (chart 2).

REORGANIZE works on the existing leaf pages. It puts them in the right order and moves rows together from sparsely filled pages, at most up to the fill factor. It does not empty pages that are already fuller. Microsoft describes exactly this limit in the documentation for sys.dm_db_index_physical_stats.

REBUILD rebuilds the index and fills the leaf pages up to the fill factor again.

Both operations reduce fragmentation: REORGANIZE to 0.28%, the offline REBUILD to 0%. By the percentage, both are a success.

The next 100,000 inserts

Chart 1

After REORGANIZE, more than five times as many split log records as after REBUILD FF81

Median of three runs, SQL 2022 and 2025 identical. Highlighted: the two main arms.

Main comparisonControl arms010,00020,00030,000REORGANIZE14,870REBUILD FF81 offline2,632No maintenance15,066Statistics only15,066REBUILD FF81 online2,538REBUILD FF10030,455Split log records (LOP_DELETE_SPLIT) for the next 100,000 inserts Main comparisonControl arms010,00020,00030,000REORGANIZE14,870REBUILD FF81 offline2,632No maintenance15,066Statistics only15,066REBUILD FF81 online2,538REBUILD FF10030,455Split log records (LOP_DELETE_SPLIT)for the next 100,000 inserts
After the same maintenance baseline, the same 100,000 inserts follow for each variant. Shown is the median of the counted LOP_DELETE_SPLIT records from three runs. Synthetic GUID index on SQL Server 2022/2025; not a measurement of production user latency. Source: Our own measurement, LAB-12, SQL Server 2022/2025, 5 October 2026
Data for the chart
Split log records and fragmentation after the next 100,000 inserts per variant
VariantSplit log recordsFragmentation afterwards
REORGANIZE14,87058.2%
REBUILD FF81 offline2,63212.8%
No maintenance15,06669.8%
Statistics only15,06669.8%
REBUILD FF81 online2,53812.8%
REBUILD FF10030,45596.8%

Median of three runs, SQL Server 2022; SQL Server 2025 delivers the same medians.

Main comparison: split log records and fragmentation after the next 100,000 inserts
VariantSplit log recordsFragmentation afterwards
REBUILD FF81 offline2,63212.8%
REORGANIZE14,87058.2%

After REORGANIZE, the same inserts produce more than five times as many split log records as after the REBUILD with reserve; in other words, the REBUILD leads to about 82% fewer than REORGANIZE. Both engines deliver the same numbers; the key sequence is the same on both.

The control arms show why:

Control arms: split log records after the next 100,000 inserts
Control armSplit log recordsWhat it shows
No maintenance15,066REORGANIZE is almost at the level of no intervention.
Statistics only15,066Statistics maintenance changes nothing on the pages.
REBUILD FF81 online2,538Online or offline makes hardly any difference for the reserve.
REBUILD FF10030,455Freshly ordered, but without reserve: twice as many as after REORGANIZE.

So a fresh, ordered index is not automatically a good starting point for the next inserts into existing ranges. And statistics maintenance can improve a plan, but it does not create room on a page. Conversely, a REBUILD also updates the index statistics. If you see faster queries after a REBUILD, check which of the two effects was at work.

Fewer split log records do not mean proportionally faster inserts. In the lab, insert time after the REBUILD dropped by 17 to 26% compared with REORGANIZE. That is an indication, not a latency measurement: the counting itself, commits in groups of 1,000 rows and background I/O distort absolute times.

The average alone does not explain it

After REORGANIZE, the index is on average even slightly fuller than after the REBUILD, 85.3% versus 83.4% page density. The average alone therefore does not explain the subsequent insert behavior. What also counts is on which pages the free space is.

Chart 2

Full pages stay full after REORGANIZE

Fill level of all captured leaf pages after REORGANIZE and after REBUILD FF81 (SQL 2022, first run). Marked: pages with less than 225 bytes free.

How to read this: Horizontal: how full is a page? Vertical: share of pages with this fill level.

Overview, full scaleAfter REORGANIZE85.3% full on average · no room: 9.21%0%50%100%0%20%40%60%80%100%After REBUILD FF8183.4% full on average · no room: 0%0%50%100%0%20%40%60%80%100%almost 100% of pages(36,666 of 36,667, 30 rows each)Detail view: after REORGANIZE, own axis 0–25%0%10%20%0%20%40%60%80%100%20.0%about half full (freshly split)Fill factor 81Orange area:less than 225bytes free9.21%of leaf pagesFill level of the leaf page (used space of 8,096 bytes)Share of pages Overview, full scaleAfter REORGANIZE85.3% full on averageno room: 9.21%0%50%100%0%25%50%75%100%After REBUILD FF8183.4% full on averageno room: 0%0%50%100%0%25%50%75%100%almost 100% of pages(36,666 of 36,667, 30 rows each)Detail view: after REORGANIZE,own axis 0–25%0%10%20%0%25%50%75%100%FF 81about half full(freshly split)Fill level of the leaf page(used space of 8,096 bytes)Orange area: less than 225 bytes free
Each bar stands for one row count per page (one row corresponds to 2.8 percentage points), unit: share of the captured leaf pages. The overview shows both states on the full scale up to 100%, the detail view only REORGANIZE with its own axis up to 25%. Dashed: the configured fill factor 81. SQL Server 2022, first run, not a median. 9.21% of the pages is not a split probability of 9.21%. Source: Our own measurement, LAB-12, SQL Server 2022/2025, 5 October 2026
Data for the chart
Leaf pages per row count after REORGANIZE and after REBUILD FF81
Rows per pageFill levelREORGANIZE pagesShareREBUILD FF81 pagesShare
1–16up to 44.5%1210.34%00%
1747.2%1,2983.62%00%
1850.0%4681.31%00%
1952.8%1,6054.48%00%
2055.6%5121.43%10.003%
2158.4%1820.51%00%
2261.1%1010.28%00%
2363.9%190.05%00%
2466.7%840.23%00%
2569.5%740.21%00%
2672.3%610.17%00%
2775.0%580.16%00%
2877.8%650.18%00%
2980.6%1,3923.89%00%
3083.4%1,8885.27%36,66699.997%
3186.2%5,03214.05%00%
3288.9%7,16420.00%00%
3391.7%7,08019.76%00%
3494.5%5,31814.85%00%
3597.3%3,3019.21%00%

Captured leaf pages: 35,823 after REORGANIZE, 36,667 after REBUILD FF81. Fill level = (8,096 − free bytes) / 8,096. A page holds at most 35 rows of 225 bytes.

In this setup, a new test row takes 223 bytes plus 2 bytes in the page's slot array. After REORGANIZE, 9.21% of the captured leaf pages have less than 225 bytes free. Another row on one of these pages triggers a split. After REBUILD FF81, this applies to no captured page; almost all pages there are in the same fill class.

Both the total amount and the distribution of the reserve differ in this test. 9.21% of the pages is not a split probability of 9.21%: how often inserts hit these pages depends on the key distribution. But the distribution shows why a good average does not predict the next insert load.

What it costs

Maintenance costs log, time and availability. In our frozen comparison, offline, measured as generated log record bytes:

Chart 3

The recovery model changes the cost ratio

Generated log and duration per intervention, SIMPLE and FULL, REBUILD FF81 offline. SQL 2022, median of three runs.

SIMPLEoffline, generated log record bytesREORGANIZE writes ≈ 370× as much logGenerated log (MiB)0300600REORGANIZE597 MiBREBUILD FF811.6 MiBDuration per intervention (s)03060REORGANIZE55 sREBUILD FF811.2 sFULLoffline, generated log record bytesREORGANIZE writes ≈ 2.4× as much logGenerated log (MiB)0300600REORGANIZE597 MiBREBUILD FF81245 MiBDuration per intervention (s)03060REORGANIZE55 sREBUILD FF812.8 s SIMPLEoffline, generated log record bytesREORGANIZE writes ≈ 370× as much logGenerated log (MiB)0300600REORGANIZE597 MiBREBUILD FF811.6 MiBDuration per intervention (s)03060REORGANIZE55 sREBUILD FF811.2 sFULLoffline, generated log record bytesREORGANIZE writes ≈ 2.4× as much logGenerated log (MiB)0300600REORGANIZE597 MiBREBUILD FF81245 MiBDuration per intervention (s)03060REORGANIZE55 sREBUILD FF812.8 s
Same scales in both recovery models. Unit: sum of the generated log record bytes in MiB and duration of the intervention itself in seconds, not the size of the log file or log backup and not the time of the following inserts. Under SIMPLE, the REBUILD bar is barely visible: 1.6 MiB. Synthetic single index, offline; other conditions, such as an online REBUILD, can change the ratio considerably. Source: Our own measurement, LAB-12, SQL Server 2022/2025, 5 October 2026
Generated log and duration per intervention by recovery model, SQL Server 2022, offline
RecoveryREORGANIZEREBUILD FF81 offlineRatio
SIMPLE597 MiB · 55 s1.6 MiB · 1.2 s~370×
FULL597 MiB · 55 s245 MiB · 2.8 s~2.4×

Under SIMPLE, the offline REBUILD is minimally logged, under FULL it is not. The statement “REORGANIZE always writes orders of magnitude more log” is therefore not true in general. We measured the sum of the generated log records, not the size of the log file or the log backup. Other operating conditions, such as an online REBUILD (34 MiB in the same comparison), can change the ratio considerably.

Availability is also part of the decision. An offline REBUILD can block access to the table for the duration of the operation; an online REBUILD also has short locking phases (Microsoft: How online index operations work). REORGANIZE runs online, but it also puts load on the system. We did not measure this under concurrent writes here.

Microsoft generally recommends REORGANIZE because of its lower resource consumption, and at the same time asks you to check benefit and cost against the actual workload (Index maintenance strategy). Our case does not contradict this. It shows a goal that REORGANIZE does not achieve, namely new reserve for inserts into existing ranges.

Deep dive: 60 days, three strategies

A frozen comparison shows one moment. But maintenance runs again and again. Hence a second series: empty start, GUID plus 100 bytes of payload, fill factor 80, 10,000 randomly distributed single-row inserts every simulated day, followed by the check of the maintenance rule. Below 1,000 leaf pages, no rule intervenes. Maintenance offline under SIMPLE; one deterministic series per strategy.

  • No maintenance
  • 5/30% rule: REORGANIZE from 5% fragmentation, REBUILD from 30%. This rule is the default in many maintenance jobs.
  • Early REBUILD: REBUILD with fill factor 80 from 1% fragmentation. This comparison variant follows Jeff Moden's approach for this insert case.
Chart 4

In this insert case, the 5/30% rule accumulates more split log records than no maintenance

10,000 inserts per simulated day, fill factor 80, deterministic series, SQL 2022 (SQL 2025 identical).

5/30% ruleNo maintenanceEarly REBUILDSplit log records, cumulative05,00010,00015,00020,000010203040506022,3475/30% rule13,631No maintenance4,199Early REBUILDSimulated day (10,000 single-row inserts per day, fill factor 80, maintenance offline under SIMPLE)Interventions of the 5/30% rule: 9 × REBUILD (tick), 37 × REORGANIZE (circle)Interventions with early REBUILD: 20 × REBUILD (tick) 5/30% ruleNo maintenanceEarly REBUILDSplit log records, cumulative05,00010,00015,00020,000020406022,3475/30% rule13,631No maintenance4,199Early REBUILDSimulated day(10,000 inserts per day, FF80,offline under SIMPLE)5/30% rule: 9 × REBUILD, 37 × REORGANIZEEarly REBUILD: 20 × REBUILDTick = REBUILD, circle = REORGANIZE
Cumulative LOP_DELETE_SPLIT records over 60 simulated days, empty start. One deterministic series per strategy without a measure of spread, no independent workloads; maintenance offline under SIMPLE. Below the chart, the days on which the rule intervened. The series shows this insert case, not a general maintenance standard. Source: Our own measurement, LAB-12, SQL Server 2022/2025, 5 October 2026
Data for the chart
Cumulative split log records per strategy
Cumulative up to5/30% ruleNo maintenanceEarly REBUILD
Day 103,1892,2861,691
Day 205,7194,5402,785
Day 308,7546,8173,274
Day 4013,4039,0723,681
Day 5017,86611,3523,951
Day 6022,34713,6314,199
Three strategies over 60 simulated days, SQL Server 2022
Strategy (SQL 2022)REBUILD / REORGANIZESplit log recordsMaintenance log
Early REBUILD20 / 04,1994.3 MiB
No maintenance0 / 013,6310
5/30% rule9 / 3722,3474,574 MiB

In this insert case, the 5/30% rule does not land between the other two but well above them: with 46 interventions, it produces more split log records than no maintenance at all and more than a thousand times as much maintenance log as the REBUILD strategy. The reason is the same as in the frozen comparison: the many REORGANIZE runs compact pages without creating new reserve.

The 1% threshold is not the secret here. With fill factor 100, the same rule triggers 86 REBUILDs in a 90-day run, and the index accumulates 422,881 split log records. Without reserve, frequent rebuilding does not help either. The 1% strategy is a comparison variant for this case, not a new general standard.

What we conclude

For the case we examined, repeated inserts into existing key ranges, a REBUILD with reserve is an effective candidate to test. Here, REORGANIZE reduced logical fragmentation but did not renew the reserve on full pages. The difference we observed matches the cross-check shown by Jeff Moden, now on two current versions.

Whether one of these effects justifies the intervention depends on the goal and the workload. Indexes with ascending keys, rarely modified tables or mostly read indexes have different needs, and reserve costs pages that scans have to touch. Better density for reads can also be a legitimate maintenance goal.

Our proposal for the series:

Index maintenance needs a measurable goal. What matters is whether its effect on the workload justifies the cost and the disruption to operations.

  1. 01

    Name the goal

    Should scans touch fewer pages, should inserts into existing ranges split less often, or should space be freed? For plan problems, check estimates and plan choice.

  2. 02

    Choose a matching action

    For reading, page count and density matter; for inserting, usable reserve on the target pages.

  3. 03

    Check the effect

    The same workload before and after, including the maintenance cost, the locking impact and the time until the next intervention.

A fragmentation value after the job answers none of these three points.

Coming in part 3: What happens with no maintenance at all? We let two indexes grow to over three million rows without any intervention. Where page density stabilizes and why split log records keep occurring anyway follows in part 3.

Origins and further work

The experiment ideas and cross-checks in this series build in particular on Jeff Moden's work on index maintenance. He has described the limit of REORGANIZE on full pages since at least 2020 on SQLServerCentral. His talk “Black Arts” Index Maintenance #1 examines the distribution of free space, different fill factors and recurring maintenance strategies in a one-year simulation; the early REBUILD strategy and the criticism of the 5/30% rule come from there. He makes slides and scripts freely available for learning purposes. The exchange with him on LinkedIn prompted our own experiments. We thank him for the suggestions. Our measurements come from the PSG lab; their conditions and limits are stated in each case.

Limits of the measurement
  • Synthetic data, one clustered index without nonclustered indexes, fixed row width, no deletes, no compression, no LOBs, no partitions.
  • Serial load, MAXDOP 1, no concurrent writers; locking impact of online and offline REBUILD not measured.
  • Linux containers on a lab VM, with data, log and TempDB on the same SATA SSD. SQL Server 2022 (16.0.4295.3) and 2025 (17.0.5005.3), Developer Edition.
  • Auto statistics, Query Store and ADR turned off for the test.
  • Maintenance comparison: three repetitions per variant, median. The 60-day series are one deterministic trajectory each, without a measure of spread; they are not independent workloads.
  • The page distribution (chart 2) comes from the first run on SQL 2022, not from a median.
  • Log volumes: sum of log record lengths after an LSN boundary, not log file or log backup size.
  • Checked on 5 October 2026. The test conditions are documented; we will provide separate information about a public reproduction package.
Quiz · 10 questions

Does your maintenance make room for the next inserts?

Every answer is explained right away, with a link to the relevant part of the article. At the end, you get an assessment and a link you can share. No cookies.

Further reading