News for hackers. Stuff that matters.
Re:What's new in the Postgres 16 query planner (a.k.a. optim... by s08148692 on Friday February 09, 2024 @06:53AM (#39313885)
> when Postgres picks a stupid plan and can't be convinced to do something reasonable.

In my experience it can always be convinced to make a reasonable plan, but it's not always trivial. Sometimes it's just adding an index, sometimes it's entirely rewriting a query

Re:What's new in the Postgres 16 query planner (a.k.a. optim... by CubsFan1060 on Friday February 09, 2024 @07:51AM (#39314300)
Agreed. I've found this setting to be difficult: https://postgresqlco.nf/doc/en/param/default_statistics_targ...

Too low == bad query plan. Oddly, too high == bad query plan.

Re:What's new in the Postgres 16 query planner (a.k.a. optim... by Izkata on Friday February 09, 2024 @11:32AM (#39316587)
There's also "the query plan you want won't do what you expect, so I'm giving you the next best thing until you tell me the right way to store the data": https://news.ycombinator.com/item?id=39311536