workOwonworkOwonA New Way to Connect
HomeFeedJobsCommunitiesEventsFeaturesAbout workOwon
HomeFeedJobsCommunitiesEventsFeaturesAbout workOwon
HomeCommunitiesData Engineering Guild

Our ledger_entries table hit 300M rows. Monthly range partitioning on created_at + making sure every query…

NC

Nikhil Chowdhury

Backend Engineer | Python, Django, Postgres | Fintech | Remote-first

7 Oct 2026· Data Engineering Guild

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

Comments

  • RI

    Reyansh Iyer7 Oct 2026

    The 'every query includes a date filter' part is where it falls apart in practice. How did you enforce it?

  • NC

    Nikhil Chowdhury7 Oct 2026

    @Reyansh code review + a CI check that flags queries on that table without created_at in the WHERE. Crude but works.

Join the conversation

Join workOwon to react, comment and follow people and communities you care about.

Log inJoin now

Popular communities

See all