Re: Reduce "Var IS [NOT] NULL" quals during constant folding - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Date
Msg-id CAMbWs49qYP2p0pJYeXVxuNfL-eX24v1jPgU4JjkDbnkQ4ujwbw@mail.gmail.com
Whole thread Raw
In response to Re: Reduce "Var IS [NOT] NULL" quals during constant folding  (Andrei Lepikhov <lepihov@gmail.com>)
List pgsql-hackers
On Tue, Jul 1, 2025 at 10:57 PM Andrei Lepikhov <lepihov@gmail.com> wrote:
> I like the general idea of this work. But I wonder, why is a new hash
> table designed to store only the notnullattnums field? From the
> discussion, it is not apparent why not to cache all (or most of) the
> data needed for get_relation_info. In cases where multiple subqueries
> reference the same table, it could save some cycles and memory.

I think this idea was already thoroughly discussed earlier in this
thread when Robert proposed moving get_relation_info() to an earlier
stage.  One reason against it is that not every RTE_RELATION relation
will be actively part of the query.  Collecting the whole bundle of
catalog information for such relations is wasteful and can negatively
impact performance.

Thanks
Richard



pgsql-hackers by date:

Previous
From: "Aya Iwata (Fujitsu)"
Date:
Subject: RE: [WIP]Vertical Clustered Index (columnar store extension) - take2
Next
From: Richard Guo
Date:
Subject: Re: Memoize ANTI and SEMI JOIN inner