Re: Optimization issue of branching UNION ALL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimization issue of branching UNION ALL
Date: 2022-12-22 03:48:55
Message-ID: 1800456.1671680935@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> 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.

Yeah, I was wondering about that too ... maybe it was important
in some previous state of the code? I didn't do any archeology
though.

> 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.

Oh, duh ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-12-22 04:14:26 Re: Optimization issue of branching UNION ALL
Previous Message Kyotaro Horiguchi 2022-12-22 02:54:28 Re: Inconsistency in reporting checkpointer stats