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.
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
- T, a mature single-entity database, 114 GB. Cost calculation details were 29.9 GB, 26% of the database. They had been trimmed in a series of one-off cleanups, the last up to a cutoff about six years back. Nothing was scheduled. Keeping the newest year frees about 28 GB, with a standard routine; finance should still confirm the year.
- S, one company with a custom add-on, 98 GB. The add-on's tables were 48.8 GB, about half. It's one of the two add-ons the tenant in Part 5 runs, the 3PL and Freight Reconciliation solutions. Its in-database archive was filled by manual runs and nothing ever purged it.
- P, finance only, several legal entities, 57 GB. The database log, D365's audit trail of changes to selected tables, held 20.3 GB, because whole records were being logged on two ledger journal tables. It lives in the Operations database, not in the Log meter on the PPAC summary. Batch history was 18.6 GB from about 26,000 batch runs a day with no cleanup job.
- R, a young manufacturing database, 18 GB. No single driver. But the data management job history cleanup had stopped more than a year earlier, and batch history and batch job records were waiting to be cleaned.
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
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
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.
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
- Open the table view in PPAC for each environment and note the top ten tables. Part 2 shows where it is.
- List the standard cleanup routines, and check which have a batch job with a recurrence and a recent successful run.
- Look at what the database log records, and how long it keeps it.
- If you run a custom add-on, find out who decides how long its data stays.
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.
