Our ledger_entries table hit 300M rows. Monthly range partitioning on created_at + making sure every query…
Nikhil Chowdhury
Backend Engineer | Python, Django, Postgres | Fintech | Remote-first
Our ledger_entries table hit 300M rows. Monthly range partitioning on created_at + making sure every query includes a date filter = partition pruning does the rest.
Gotchas:
• Unique constraints must include the partition key
• Create future partitions ahead of time (we use pg_partman)
• Check EXPLAIN to confirm pruning is happening
4 reactions2 comments
