Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment - Mailing list pgsql-hackers

From David Rowley
Subject Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Date
Msg-id CAApHDvr-0MLz58OPgzFdOfVouCGFm23iO4Bn_4hLBgCLzG+==w@mail.gmail.com
Whole thread Raw
In response to Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment  (Andrei Lepikhov <lepihov@gmail.com>)
Responses Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
List pgsql-hackers
On Wed, 23 Jul 2025 at 02:35, Andrei Lepikhov <lepihov@gmail.com> wrote:
> The 'Buffers:' way looks more natural to me. I don't like duplicated
> text in the explain format - it is already cluttered by multiple
> unnecessary elements that distract attention from the problematic plan
> elements, such as unplaggable costs output if we only need row
> predictions, '.00' in estimations, etc.

Seems logical.

> However, at first, I'd consider how it could be added to the
> IncrementalSort and HashJoin. The number of estimated groups/buckets may
> also provide some insights into the planner's decision.

Sounds like another patch for another thread.

> Will you add the ExplainOpenGroup call to the final version of the patch?

I'm leaning towards not doing that as a reader might expect all the
"Estimates" to be within that group, but the estimated cost and row
counts won't be in there. Maybe it's possible to circumvent that
expectation by naming the group something like "MemoizeEstimates", but
IMO, that seems excessive for 4 properties.

Do you have an argument in mind to support adding the group?

David



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: index prefetching
Next
From: Michael Paquier
Date:
Subject: Re: track generic and custom plans in pg_stat_statements