In four D365 Finance and Supply Chain databases we assessed, from 18 GB to 114 GB, the biggest consumer of space was different every time: one standard table, a custom add-on, the database log and batch history, or nothing in particular. Standard cleanup jobs that were never scheduled, or had stopped, showed up in all of them.

About 75% of a 57 GB finance-only database was logs and history. In a 114 GB database, one standard table held 26% of the space. Those are two of four databases we assessed for size, and the fact that they look nothing alike is the first finding.

Database capacity series. Part 1, how license cuts shrink the allowance; Part 2, the LCS to PPAC capacity check; Part 3, where the space goes in four databases; Part 4, what to delete, copy, archive or keep; Part 5, a 3PL tenant on its way from 900 GB to 350 GB. The Part 5 tenant runs the 3PL and Freight Reconciliation solutions.

In plain words: before you can shrink a database, you need to know what's in it. We pulled table sizes, row counts by year, index usage and cleanup job history from each one, then modeled how much could go and how sure we can be. A fifth, larger tenant from the same work has its own case study, so it isn't repeated here.

Part 3 in about three minutes: the four databases, how much could go, and why growth decides. Watch it on its own page, with chapters →

How to read these numbers

All four analyses ran on sandbox copies of production, between one day and about three months old. Sizes are observed. Savings are modeled: a retention rule applied to the rows by age. Nothing here is a before and after of a cleaned database. Index usage at T and P came from production. Sandboxes also collect their own history after a copy, so items like batch history can be bigger or smaller in production.

What we found in each

Bar chart titled One Thing Usually Dominates. It's Rarely the Same Thing, four sandbox copies of production. Database T, mature, one legal entity: 114 GB, of which cost calculation details 29.9 GB. Database S, custom add-on, one company: 98 GB, of which add-on tables 48.8 GB. Database P, finance only, several entities: 57 GB, of which logs and history 42.9 GB. Database R, young, manufacturing: 18 GB with no single driver. Note: sizes are observed in sandbox copies, so production can differ; P's 42.9 GB is 20.3 GB of database log, 18.6 GB of batch history and 4.0 GB of document history.
Bar length is size; the colored part is the biggest single driver in each.
Donut chart titled Three Kinds of History Fill Three Quarters of It, database P, finance only, sandbox copy. 57 GB in use: database log 20.3 GB, batch history 18.6 GB, document history 4.0 GB, everything else 14.1 GB. Center: 75% logs and history.
Database P: the gray slice is everything else, the finance data included.
ℹ If you read one line

Every database we assessed had standard cleanup routines that were never scheduled or had stopped. It's the cheapest saving there is, and it's almost always there.

How much could go

Table titled How Much Each Database Could Lose, modeled, not measured after cleanup. S: 98 GB used, 61 GB modeled reduction (62%), 11.6 GB no-regret, index share 56%, the rest needs retention decisions and code for the add-on's data. T: 114 GB, 42 GB (37%), 39.7 GB no-regret, 52%, almost nothing else needed beyond scheduling the standard jobs. P: 57 GB, 18.2 GB (32%), 18.2 GB no-regret, 23%, audit sign-off on the database log takes it to 29.6 GB (52%). R: 18 GB, 3.7 GB (21%), 3.7 GB no-regret, 41%, the value is the maintenance plan. Note: no total on purpose.
No-regret means standard cleanup routines, no custom code. Confirm the retention period with the data owner.

The split matters more than the total. At T, almost the whole saving is no-regret: schedule the standard jobs and it's done. At S, most of it needs someone to agree how long the add-on's data has to stay, and then code to remove it. At P, one audit decision about the database log is worth another 11.4 GB, about a fifth of the database.

We don't add the four together. Four sandbox copies of different ages don't make one portfolio number, and a total would suggest a precision we don't have.

Indexes are a quarter to more than half the space, and usually not the lever

Indexes were 56% of S, 52% of T, 41% of R and 23% of P. That makes index removal look attractive. Mostly it isn't. At T and P the evidence came from production, and at T, 976 of 980 indexes were read in a window that included a month-end. At S and R it came from sandboxes, where usage statistics reset at every refresh, so a "never read" index there proves little. An index that looks unused in a sandbox can be the one month-end close depends on.

Which numbers to trust

Table titled Five Sources of Space, Ranked by How Far You Can Trust the Number, across the four databases in this article. Standard cleanup routines never scheduled, or stopped: found in every database, high. Database log set up too broadly: 10 to 14 GB at P, retention period an audit decision, high on size. Custom add-on retention, archives, staging, live windows: most of the modeled saving at S, medium. Removing indexes: redundant by design is safe, never read rests on short sandbox evidence, low to medium. Archiving standard posted data: about 11 GB at S, if the archive covers it, low today.
The further down the list, the more the number depends on decisions and evidence you don't have yet.

Growth decides whether it lasts

A cleanup is a one-off. Growth isn't. P was adding an estimated 3 to 6 GB a month before any action, so its 18.2 GB no-regret saving would be gone in three to six months without scheduled jobs. R adds only about 0.2 GB a month, and its value is exactly that: a maintenance plan now, before the history piles up. The tenant in Part 5, most recently growing about 31 GB a month, would have erased a modeled 166 GB cleanup in about 5.4 months, which is why that project runs daily.

! Be honest about the limits

These are modeled savings on sandbox copies, not measured results. Production can differ, deletes can take far longer than expected on large tables, and space the database frees isn't always space the capacity report stops counting. Measure in PPAC after the first cycle.

What to check in your own tenant

✓ Bottom line

There's no standard shape for a large D365 database, so there's no standard fix. Find the biggest driver first, take the no-regret cleanup immediately, and treat everything that needs a decision or code as its own small project with an owner.

Frequently asked questions

Why don't you give a total saving across the four databases?

Because the baselines aren't comparable. They're sandbox copies of different ages and sizes, and a total would overstate how precise the estimate is.

Should we start by removing unused indexes?

Usually not. Index usage statistics reset at each sandbox refresh, so short windows miss month-end and year-end work. Remove indexes that are redundant by design, and treat the rest as a separate, evidence-led project.

What's a no-regret saving?

Space that standard cleanup routines free with no custom code and no policy change: batch history, notifications, staging, cost calculation history and similar technical data. Confirm the retention period with the data owner before the first run.