Distributed COUNT(DISTINCT) with HyperLogLog on PostgreSQL
summary
Shows how to implement approximate distinct counts in PostgreSQL using the HyperLogLog algorithm, and how to make those counts work across a distributed setup. Covers using HyperLogLog data structures (likely via extensions), merging HLL state across nodes, and integrating that into PostgreSQL queries to provide scalable COUNT(DISTINCT) estimates.
AI-written summary · about
chapters (4)
- 0:00Start
- 15:59Error rate of HLL is damn good
- 23:32How does HLL work? Stochastic Averaging
- 33:50How to merge COUNT(DISTINCT) with HLL
related talks
12mScalable Uniques in Postgres - HyperLogLog
26mBreaking Down Our Billion User Reach with HyperLogLog
28mBreakout Session
35mBreakout Session
52mA Deep Dive into Postgres Statistics
45mSELECT 'amazing_features' FROM "postgresql"
45mOK Log: Distributed and Coördination-Free Logging
38mAdd ALL the things: abstract algebra meets analytics
