Beginner's Guide to Partitioning vs Sharding in Postgres
summary
Partitioning is a built‑in Postgres feature with three modes Partition by range/list/hash that speeds queries when a WHERE on the partition key lets Postgres do partition pruning, keeps hot partitions on fast SSDs, lets autovacuum run in parallel, and enables instant bulk deletes by doing a drop table for a partition. Sharding uses the cus extension to distribute shards across nodes for more CPU/memory and shard pruning; pg_partman and pg_cron help automate partition maintenance.
AI-written summary · about
chapters (8)
- 0:00Introduction and welcome
- 2:56What is PostgreSQL partitioning
- 12:25What is sharding
- 23:27Using partitioning and sharding together
- 29:06Why partitioning improves query performance
- 34:04Why sharding improves query performance
- 36:30Key takeaways and conclusion
- 39:23Q&A
related talks
40mBeginner's Guide to Partitioning vs. Sharding in Postgres
31mPostgres Partitioning Best Practices
30mPostgreSQL Partitioning: Slicing and Dicing for Performance and Easier Maintenance
23mPostgres Partitioning Best Practices
33mFive Sharding Data Models and Which is Right
34mPostgreSQL sharding, state of the art
45mThe Future of Postgres Sharding
26mMy Postgres partitioning cookbook
