For me, it’d be more control over the query planner, ideally down to the level of submitting my own physical query plan. I was looking at a query yesterday that joined 3 tables and we were unable to convince Postgres to use the optimal plan, which was to scan an index on Table1 that matched its ORDER BY order, and filter by joining against the other tables. With a CTE for Table1 that had a limit on it, Postgres would…
Yes this is completely my experience too. I spent most of yesterday battling with the query planner. Sometimes you can't express with table statistics something that you know to be true for the exact query that you're making. There are a lot of arguments about query hints etc becoming stale and the performance changing as the table grows but I'm less worried about that - it would be a gradual degradation of performan…
> Bluesky scaling lesson: Postgres is not a great choice if your data can be irregular.
> The query planner will switch over to a new plan that consumes 100% CPU in the middle of the night whenever its table stats flip the heuristics the wrong way.
> Postgres badly needs query hints like MySQL has!