Hi Tom,
On 25/02/2020 20:34, Tom Lane wrote:
> cost_qual_eval_walker is not very bright about what to do with
> the AlternativeSubPlan constructs. It looks like it's assuming
> that the non-hashed alternatives will be chosen, which they aren't
> (if they were, this estimate might not be so far out of line).
> But we can't just switch it to make the other assumption, because
> that would skew the results for other cases.
What do you think of making it take both into account?
That's an approximation of a piecewise linear function by a linear one,
so it cannot be very precise, but I think it's better than the current one.
Best, Alex