News for hackers. Stuff that matters.
Re:PostgreSQL 10 Released by anarazel on Thursday October 05, 2017 @03:50PM (#15412073)
> I'm curious how much query planners have to make tradeoffs between effective optimizations and not overloading the analysis phase.

In case of PostgreSQL: constantly. Pretty much every planner improvement has to argue that it's not likely to unduly increase plan time.

Re:PostgreSQL 10 Released by kuschku on Thursday October 12, 2017 @11:23AM (#15458636)
What about pre-compiling plans? With server-side prepared statements it would make sense to use entirely different planning time tradeoffs.
Re:PostgreSQL 10 Released by anarazel on Friday October 13, 2017 @05:15PM (#15469289)
It's not that simple. Server side prepared statements are used to great effect in OLTPish scenarios too.

A serviceable approach would be to perform additional optimizations based on the query's cost - but that's hard to do without incurring a complete replan, because of the bottom up dynamic programming approach of a good chunk of the planning.

Re:PostgreSQL 10 Released by kuschku on Friday October 13, 2017 @06:11PM (#15469571)
Well, I’d love to see a way to set such a query planning cost target.

There’s a few statements which I never change, but run thousands of times a day, and which are extremely expensive.