~/talk

Efficiently distributing Postgres with Citus – How to choose the right shard key?

Talkat Citus Con: An Event for Postgres 2022 · 2022-04-12..04-13· [databases]
slides:none on file

Citus uses a create_distributed_table shard key to hash and place rows across workers; pick a column with hundreds-to-tens-of-thousands cardinality to avoid skew, or you bottleneck a single node. Multi-tenant apps shard on tenant_id to keep joins, transactions and indexes local; real‑time analytics co‑locate large fact tables on a shared dimension; high‑throughput OLTP shards on the point-lookup key. Sai outlines using pg_stat_statements or PGCollector to analyze queries and even heuristically predict shard keys for Hyperscale Citus.

AI-written summary · about

  1. 0:00Introduction
  2. 1:31What is Citus?
  3. 4:24What is a distribution column & why is it important?
  4. 9:223 steps to building highly scalable apps with Citus
  5. 10:43Multi-tenant SaaS apps
  6. 15:40Real-time operational analytics apps
  7. 19:33High throughput transactional apps
  8. 22:14Exploring automation of choosing the right shard key
  9. 24:31Q&A with Sai & Marco
~/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.