Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Lukas Fittl <lukas(at)fittl(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Date: 2025-07-23 11:07:56
Message-ID: 3a4bff1b-f6d5-41d4-b956-2da25bed0aae@tantorlabs.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 23.07.2025 03:11, David Rowley wrote:
> On Wed, 23 Jul 2025 at 02:35, Andrei Lepikhov <lepihov(at)gmail(dot)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.

+1

>
>> 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.

I agree. I would consider adding a group if we displayed information in
a looped format, like for Workers, or if we had some particularly useful
data for parsers - for example, timings or memory usage. But for four
estimates, grouping seems unnesseray.

Given that, patch v11 still looks like the most appropriate version to me.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrice Chapuis 2025-07-23 11:20:52 Postgres keep alive configuration
Previous Message Etsuro Fujita 2025-07-23 10:45:42 Re: Document transition table triggers are not allowed on views/foreign tables