Robert Haas <robertmh...@gmail.com> writes:
> On Tue, May 3, 2022 at 2:13 PM Tom Lane <t...@sss.pgh.pa.us> wrote:
>> In any case, fundamental redesign of what EXPLAIN prints is a job
>> for v16 or later.  Are you okay with the proposed patch as a v15 fix?

> Yes. I can't really vouch for it, but I don't object to it.

I re-read the patch and noticed that I'd missed one additional change
needed:

-       run_cost = cpu_per_tuple * baserel->tuples;
+       run_cost = cpu_per_tuple * path->subpath->rows;

That is, we should estimate the number of qual evaluations and
cpu_tuple_cost charges based on the subpath row count not the
non-parallel-aware relation size.  So this reduces the cost of
the SubqueryScan itself, as well as its row count, in partial paths.
I don't see any further change in regression test results though.

Pushed with that change.

                        regards, tom lane


Reply via email to