Re:Index bloat reduced in PostgreSQL v14
by janto on Saturday September 11, 2021 @04:58AM
(#28490476)
I wonder if the planner can look at stats of full query execution in addition to the table stats. That way it can fall back to a previous plan (or previous table stats) if things get crazy.
[ Parent
| on HN ]
Re:Index bloat reduced in PostgreSQL v14
by pgaddict on Saturday September 11, 2021 @08:09PM
(#28497336)
No, we don't collect any optimizer stats during query execution. It's trickier that it seems, because (a) collecting the stats is actually pretty expensive, and (b) when using indexes, you may actually see just a tiny part of the data.
There have been some discussions about "learning" and correcting some of the estimates, but there was no patch so far.