public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrei Lepikhov <[email protected]>
To: David Rowley <[email protected]>
To: Ilia Evdokimov <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Lukas Fittl <[email protected]>
Cc: Daniel Gustafsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Nikolay Samokhvalov <[email protected]>
Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Date: Tue, 22 Jul 2025 16:35:38 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvq+uqf3MRFb+Ai3W1k3fMnrwWBLhzUAYj3_+MM8jK32fA@mail.gmail.com>
References: <CAP53Pky29GWAVVk3oBgKBDqhND0BRBN6yTPeguV_qSivFL5N_g@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAApHDvpT0Y1BfYgeWz+PkKaLBEff1izYOAjNSibhBTNFEdqLtg@mail.gmail.com>
	<CA+TgmobDHmaNTqi5yLPJoW6fTCuiWOgF9CSCSHX_OTLmGxYRUQ@mail.gmail.com>
	<CAApHDvqYL3OVvOsyvEPsDJ7h4zQh=LEygQgcQSN-TemRJLMb6Q@mail.gmail.com>
	<[email protected]>
	<CAApHDvpuM8jW-BGu7B=i6uv+jmndEo-2z_BYvj5JNmx=qV-uSQ@mail.gmail.com>
	<[email protected]>
	<CAApHDvqmyHuEt7rdFLJr4cZecbhno5OZ6iL5EQNNu9Oi1f93sQ@mail.gmail.com>
	<[email protected]>
	<CAApHDvq0Zz3+nh9hPRBP-oAocFZETfhdE_jcN8aG+Thc24Zk5g@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAApHDvq+uqf3MRFb+Ai3W1k3fMnrwWBLhzUAYj3_+MM8jK32fA@mail.gmail.com>

On 22/7/2025 00:17, David Rowley wrote:
> On Fri, 4 Jul 2025 at 20:30, Ilia Evdokimov
> <[email protected]> wrote:
>> I attached rebased v10 patch on 5a6c39b.
> 
> I've gone over this and made some cosmetic adjustments. A few
> adjustments to the comments and used Cardinality rather than double
> for some data types. I also moved the MemoizePath.calls field down
> below est_entries so that est_entries would take up some padding
> space. This saves 8 bytes of struct, and IMO, improves the logical
> order of fields. I renamed "calls" to "est_calls" so it's more aligned
> with the new fields being added by this patch.
Looks good

> 
> That removes the dilemma about which example to follow, but it's more verbose.
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.
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.

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

-- 
regards, Andrei Lepikhov





view thread (53+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox