Re: Optimization issue of branching UNION ALL
От | Richard Guo |
---|---|
Тема | Re: Optimization issue of branching UNION ALL |
Дата | |
Msg-id | CAMbWs49fj701dxtmo9A7e+Bu_aR1xyLNPL4dPG+W0cT43QKgyg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Optimization issue of branching UNION ALL (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Optimization issue of branching UNION ALL
|
Список | pgsql-hackers |
On Thu, Dec 22, 2022 at 9:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andrey Lepikhov <a.lepikhov@postgrespro.ru> writes:
> Superficial study revealed possibly unnecessary operations that could be
> avoided:
> 1. Walking across a query by calling substitute_phv_relids() even if
> lastPHId shows that no one phv is presented.
Yeah, we could do that, and it'd help some.
I noticed we also check 'parse->hasSubLinks' when we fix PHVs and
AppendRelInfos in pull_up_simple_subquery. I'm not sure why we have
this check. It seems not necessary.
In remove_result_refs, I don't think we need to check 'lastPHId' again
before calling substitute_phv_relids, since it has been checked a few
lines earlier.
Thanks
Richard
AppendRelInfos in pull_up_simple_subquery. I'm not sure why we have
this check. It seems not necessary.
In remove_result_refs, I don't think we need to check 'lastPHId' again
before calling substitute_phv_relids, since it has been checked a few
lines earlier.
Thanks
Richard
В списке pgsql-hackers по дате отправления: