Postgres Count Performance
Everybody counts, but not always quickly. This post looks into how the PostgreSQL database optimizes counting. In Postgres, there are ways to count orders of magnitude faster. We’ll look at exact counts (distinct counts) as well as estimated counts, using approximation algorithms such as HyperLogLog (HLL) in Postgres.