Help · section 44 of 46
Database storage
Mirrors the in-app Help. The live copy in your console and `dlake guide help` are always current.
Your Data Lake is billed per gigabyte of database storage, and deleting rows does not make a database smaller: SQL Server keeps the space the rows used inside the file, where it stays billable until it is released. The platform runs a weekly storage sweep across every Data Lake that measures each database file and releases the space that is genuinely free.
What is measured. For every file: its name, whether it holds data or the transaction log, its size, how much of it is in use, how much is free, and its autogrowth setting — plus the database’s recovery model. The latest measurement is shown in Settings → Storage, with when it was taken and, file by file, what a sweep would do. dlake storage show prints the same picture.
What qualifies, and what happens.
- Data files are trimmed when they hold at least 1 GB of free space and that is at least 10 % of the file. The sweep first releases any free space at the end of the file (cheap — nothing moves); if the file still qualifies it is shrunk to what it holds plus 10 % headroom, rounded up to the next 64 MB, so it does not immediately grow back. A shrink moves data to the front of the file, which fragments indexes, so it is followed by a rebuild of every index it left more than 30 % fragmented (indexes under 1,000 pages are left alone — fragmentation does not matter at that size).
- The transaction log is shrunk whenever it is larger than 128 MB, back to 64 MB. This is deliberately firm: Data Lake databases use the simple recovery model, so the log is scratch space that holds no recoverable history, and a log that once grew for one large operation would otherwise be billed at that size forever. If the log cannot be released on the first attempt the sweep checkpoints and tries once more, and reports it if it still would not shrink.
- Autogrowth is never changed — it is reported so you can see it.
Each database gets a time limit per sweep; anything it did not reach is picked up the following week.
Report first. The sweep runs in report mode unless the platform has been armed for it: it measures, records what it would release, and changes nothing. Settings → Storage → Report what would be reclaimed (or dlake storage sweep) runs that report for your Data Lake on demand. Arming the sweep to actually release space is a platform-wide setting, not a per-tenant one; a request to shrink before it is armed is refused with an explanation.
Opting out. Settings → Storage → Include this database in the storage sweep, or dlake storage shrink-enabled on|off. It is on by default. Turning it off stops the sweep from ever releasing space in your database — it is still measured, so you can see what it is holding — and the unused space stays billable. Viewing storage needs the same permission as viewing the Data Engine settings; running a report or changing the opt-out needs the same permission as the other tenant settings. Every sweep that finds something to do, or would, is recorded in the audit trail.