Size table partitions and check the partition count stays manageable.
Partition sizing balances two costs: partitions too large defeat pruning, while too many partitions make query planning expensive. A few dozen gigabytes per partition and under a thousand partitions is the usual sweet spot. Partitioning by time also makes retention a metadata operation, since dropping a partition is instant while deleting rows is not.
Partition Size
Partition size = rows per interval × row size; count = retention ÷ interval
Partition size = rows per interval × row size; count = retention ÷ interval Partition sizing balances two costs: partitions too large defeat pruning, while too many partitions make query planning expensive. A few dozen gigabytes per partition and under a thousand partitions is the usual sweet spot.
Partitioning by time also makes retention a metadata operation, since dropping a partition is instant while deleting rows is not.
This calculator takes 5 inputs: Total rows, Average row size, Days per partition, Retention period, Rows added per day. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.