Partition the ledger by account and time, keep recent data hot and old data cold, and treat rows as an append-only immutable ledger — so a single account's history is a small, indexed slice, never a scan of billions of rows. The access pattern is always "one account, a date range", so partition to match it.
Architecture
Write ─▶ Ledger table (append-only, immutable)
partition by (account_hash, month)
│
┌────────┴─────────┐
HOT tier COLD tier
last 3 mo older
Postgres/SSD S3/Parquet, Glacier
│ │
index-seek keyset paginate ──▶ API (account+range)
