New submission: PostgreSQL Optimizer Flaws: Real Stories and How We Fix Them

Alena Rybakina has submitted a new session! PostgreSQL Optimizer Flaws: Real Stories and How We Fix Them The PostgreSQL optimizer usually does a solid job producing efficient query plans. But sometimes, it underestimates cardinality or misjudges query structure, leading to seriously inefficient plans and blown-out execution times. In this talk, we'll dive into some of the most unusual and surprising real-world cases where the optimizer got it wrong. We'll analyze the root causes behind these failures and walk you through how we tackled them — from the initial idea to real feature implementations like "OR-to-ANY Transformation" [0], "VALUES-to-ANY Transformation"[1], Replanning [2], and smart extensions like AQO [3], Switch Join [4], and more. You'll leave with a better understanding of how the optimizer works and where its weak spots are - plus fresh ideas on how to outsmart it. [0] https://github.com/postgres/postgres/commit/d4378c0005e61b1bb78e88097ea6efcd... [https://github.com/postgres/postgres/commit/d4378c0005e61b1bb78e88097ea6efcd...] [1] https://github.com/postgres/postgres/commit/c0962a113d1f2f94cb7222a7ca025a67... [https://github.com/postgres/postgres/commit/c0962a113d1f2f94cb7222a7ca025a67...] [2] https://habr.com/ru/companies/postgrespro/articles/819911/ [https://habr.com/ru/companies/postgrespro/articles/819911/] [3] https://www.pgevents.ca/events/pgconfdev2024/schedule/session/147-adaptive-q... [https://www.pgevents.ca/events/pgconfdev2024/schedule/session/147-adaptive-q...] [4] https://www.pgevents.ca/events/pgconfdev2025/callforpapers/346/ [https://www.pgevents.ca/events/pgconfdev2025/callforpapers/346/] Open session [https://sessionize.com/app/organizer/session/19661/950406] These notifications can be turned off on Edit event [https://sessionize.com/app/organizer/event/edit/19661#_tab-advanced] page. Tip: You've used Classic (confer***@***orysql.org) to login. You're receiving this message because you had joined event 'HOW2025' on Sessionize. Sessionize.com, PO Box 6945, Unit 34564, London W1A 6US, UK
participants (1)
-
HOW2025