News for hackers. Stuff that matters.
Re:Debugging the Postgres query planner (2018) by stonemetal12 on Thursday September 15, 2022 @10:02AM (#32852159)
Could be cool if the RDBMS A B tested their plans, if the new plan isn't better don't switch to it. Though that would certainly add to the Black Magic of it, maybe a command to show the dev the top 5 plans and allow them to pick and pin.
Re:Debugging the Postgres query planner (2018) by darksaints on Thursday September 15, 2022 @10:41AM (#32852774)
I don't think that's really necessary, and it could make the predictability problem much worse. What is really needed is a better cost model. Query planners fail only when their statistics and cost estimates do not reflect reality. What we need are statistical distributions for costs, with those distributions updating after every query. And any time you prepare a statement, it should be looking for patterns to create better column/row statistics and indexing schemes.
Re:Debugging the Postgres query planner (2018) by hyperman1 on Thursday September 15, 2022 @04:54PM (#32858325)
That won't work, unfortunately. It just pushes the issue to the next postgres restart.