~/talk

Beginner's Guide to Partitioning vs Sharding in Postgres

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases]
slides:none on file

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

  1. 0:00Introduction and welcome
  2. 2:56What is PostgreSQL partitioning
  3. 12:25What is sharding
  4. 23:27Using partitioning and sharding together
  5. 29:06Why partitioning improves query performance
  6. 34:04Why sharding improves query performance
  7. 36:30Key takeaways and conclusion
  8. 39:23Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.