SCL-36Recommended
Watch size and growth
Record the size of the database and of its 10 biggest tables every day. Forecast when each disk or plan limit will be reached.
How to do it
Record the database and table sizes daily, so you know which table drives the growth. Large tables of old rows are candidates for retention jobs or partitions by date. This rule measures stored size, not traffic. Traffic headroom is a separate rule in the operations playbook. Set the alert thresholds as Warn before resources run out says.
How to check
The monitoring shows a daily size graph for the database and its 10 biggest tables over the last 90 days. A test alert fires when the threshold is lowered below today's size.
Sources
Related rules
- DAT-39 Let routine maintenance run in Data and databases
- SCL-25 Partition tables that outgrow memory in Scaling
- SCL-28 Splitting one database across servers too early in Scaling
- OPS-42 Warn before resources run out in Operations and observability
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/scaling/growing-the-database/capacity">Agent Wranglers scaling playbook</a>. In code you write, add a comment next to it with the same link.