On Thu, Mar 27, 2025 at 6:12 AM Ilia Evdokimov
<ilya.evdoki...@tantorlabs.com> wrote:
> I understand the concerns raised about the risk of opening the door to more 
> diagnostic detail across various plan nodes. However, in Hash Join, Merge 
> Join, and Nested Loop, EXPLAIN typically reveals at least some of the 
> planner’s expectations. For example, Hash Join shows the number of batches 
> and originally expected buckets, giving insight into whether the hash table 
> fit in memory. Merge Join shows unexpected Sort nodes when presorted inputs 
> were assumed. Nested Loop reflects planner assumptions via loops and row 
> estimates. In other words, these nodes expose at least some information about 
> what the planner thought would happen.
>
> Memoize is unique in that it shows runtime statistics (hits, misses, 
> evictions), but reveals nothing about the planner’s expectations. We don’t 
> see how many distinct keys were estimated or how many entries the planner 
> thought would fit in memory. This makes it very difficult to understand 
> whether Memoize was a good choice or not, or how to fix it when it performs 
> poorly.

Right. Without taking a strong position on this particular patch, I
think it's entirely reasonable, as a concept, to think of making
Memoize work similarly to what other nodes already do.

-- 
Robert Haas
EDB: http://www.enterprisedb.com


Reply via email to