🔍🤔 Ah, the eternal quest for the "optimal" query plan—spoiler alert, it’s a bit like chasing unicorns. 🦄✨ Turns out, the magical SQL wizardry you rely on is more like a clumsy guessing game with cost estimates. 🤪 So next time your database takes a nap, remember, it's just your query plan having an existential crisis. 😴🔄
https://vondra.me/posts/how-often-is-the-query-plan-optimal/ #optimalqueryplan #SQLwizardry #databaseexistentialcrisis #costestimates #chasingunicorns #HackerNews #ngated
How often is the query plan optimal?

An evaluation of how often Postgres picks the optimal plan for simple scan queries.

Tomas Vondra