Re: Reduce "Var IS [NOT] NULL" quals during constant folding

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Дата
Msg-id CAMbWs49qYP2p0pJYeXVxuNfL-eX24v1jPgU4JjkDbnkQ4ujwbw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reduce "Var IS [NOT] NULL" quals during constant folding  (Andrei Lepikhov <lepihov@gmail.com>)
Список 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 по дате отправления: