Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning
Date
Msg-id CAExHW5ufwK=7UgegeQVVjewiZqGaY6CsA+5ht1OpO_yS0EkHBQ@mail.gmail.com
Whole thread Raw
In response to Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning
List pgsql-hackers
On Fri, Mar 28, 2025 at 12:01 PM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.com> wrote:
>
> Comparing root->join_rel_hash with EC->ec_derives_hash in the context
> of initial hash table size is a thinko on my part. It's less likely
> that there will be 1000 subqueries (requiring 1000 PlannerInfos) each
> with more than 32 join rels than a query with 1000 equivalence classes
> in one PlannerInfo with more than 32 ec_derives. So if using a small
> initial hash table doesn't impact performance negatively, why not save
> some memory. Thinking more about it, we know the size of
> ec_derives_list when creating the hash table and we are using
> simplehash which uses its own fillfactor and its own logic to expand
> the hash table, I think we should just use the length of
> ec_derives_list as the initial size. What do you think?
>

PFA patches. 0001 and 0002 are the same as the previous set. 0003
changes the initial hash table size to the length of ec_derives.

--
Best Wishes,
Ashutosh Bapat

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposal: Progressive explain
Next
From: Alvaro Herrera
Date:
Subject: Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning