On 6/24/23 13:23, Tomas Vondra wrote:
> I really hope what I just wrote makes at least a little bit of sense.
Here is a continuation of your work:
1. non-matched estimation sophisticated to provide meaningful numbers.
2. unmatched_frac is stored in sjinfo that let us to summarise these
generated nulls along the tree of outer joins.
3. unmatched_frac is used not only for nulltest estimation but also for
correction of stanullfrac and stadistinct values (improves GROUP-BY).
4. EXPLAIN prints number of estimated and actually generated NULLs in
outer-join nodes.
This patch no less ugly than your, may be even more. Tambien, not sure
it became more meaningful. But it helps being applied to some reported
cases I have ;).
--
regards, Andrei Lepikhov