ledger ను account మరియు time ద్వారా partition చేయండి, ఇటీవలి data ను hot గా పాత data ను cold గా ఉంచండి, మరియు rows ను ఒక append-only immutable ledger గా పరిగణించండి — తద్వారా ఒక్క account యొక్క history ఒక చిన్న, indexed slice, ఎప్పుడూ billions of rows scan కాదు. access pattern ఎల్లప్పుడూ "ఒక account, ఒక date range", కాబట్టి దానికి match అయ్యేలా partition చేయండి.
ఆర్కిటెక్చర్
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)
