Keeping accurate stats is hard. The Postgres query planner is no exception!
This is a dev post classified by Jev as Databases (a free resource), kept by the Dev Radar because it carries real work, not commentary.
Keeping accurate stats is hard. The Postgres query planner is no exception! With lots of tables, it's common for queries to join data across 2, 3, 4 tables (or in less common cases, 9 like the graph below). The query planner picking a sub-optimal order can literally make a query 10x, 100x, or even 1000x slower. This paper shows that table cardinality estimation is the singular most important, and also hardest, part of this decision. If you want a glimpse into how cool query planners are without needing a PhD in stats, this one's is for you. https://www.vldb.org/pvldb/vol9/p204-leis.pdf
Posted by Ben Dicken (47.7k followers) 1 h ago · 14 likes · 1.3k views · view the original post on X. Kept by the Dev Radar as Databases.
More dev work like this
- @supermemory console updates, shipped this week! — @supermemory
- Connected @typesafeai 's Jev to BigQuery using a Cloud Run remote function. — @JeffONelson
- Halfway through @monad Metropolis hackathon. If your build has reached the onchain data… — @envio_indexer
- Attending the Rows & Columns Summit in San Francisco today? — @duckdb
- Introducing Alexandria. — @firecrawl
- Just shipped: you can now trigger Neon Functions on file uploads in Neon Object Storage. — @neondatabase
- Same database mistake, same talk with your coworker, again. Drew Skwiers-Koballa breaks… — @VisualStudio
- Enterprise data can contain the answers you need, but it's often difficult to query… — @freeCodeCamp
Every post is read and classified by Jev (TypeSafe): what it is, which market it belongs to, and whether the link is a real tool. 21.5k posts from 5k X accounts over the last 21 days, 2.5k tools, 12 markets. Collected every 5 minutes, fully re-ranked every hour — last update 2026-09-22 21:38 UTC. Full method.