Hey, I recently discovered I was holding ~45TB worth of data which was ballooning our bill (we're on the Business plan) to a number not representative of our data size which is actually only ~67GBs... I've turned our snapshot retention days down to 0; Can we just confirm that the storage will eventually go down? Pretty scary bill for what compute/storage we're using haha. Is there anything else I should change?
Hey Tanvir, I can confirm the retention change went through, all your databases are showing 0 days now. But I want to flag that it won't fully fix this on its own. The storage won't drop right away, since those bytes move into failsafe, which is a fixed 7-day window we can't configure. So it'll look flat for about a week before it falls off. And it won't settle as low as you'd want, because the storage is coming from lake_cache and the driver is your refresh loop. You're running CREATE OR REPLACE TABLE ... FROM iceberg_scan(...) about every 5 minutes across 10 tables, and each rewrite keeps a copy of the previous version, so as long as that cadence continues you'll keep a large multiple of your actual data. What would actually close the gap is making it a transient database. Transient databases have no historical snapshots and a one-day failsafe, and since lake_cache is a cache you rebuild from Iceberg anyway,. However, transient can only be set when the database is created, so it would mean CREATE DATABASE lake_cache_v2 (TRANSIENT), repointing the pipeline, and dropping the old one. Would you be open to that? More on how the lifecycle works here: motherduck.com/docs/concepts/storage-lifecycle
This looks great Tia! Thanks for sharing. I think I'll migrate with the v2 pattern!
.png)