Re: Optimization issue of branching UNION ALL

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Optimization issue of branching UNION ALL
Дата
Msg-id
1803395.1671682466@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Optimization issue of branching UNION ALL Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: Optimization issue of branching UNION ALL Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimization issue of branching UNION ALL Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: Optimization issue of branching UNION ALL Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimization issue of branching UNION ALL Richard Guo <guofenglinux@gmail.com>
Re: Optimization issue of branching UNION ALL Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimization issue of branching UNION ALL Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
> Richard Guo  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.

After a bit of "git blame"-ing, it appears that that hasSubLinks
check was introduced in e006a24ad, which added a FlattenedSubLink
node type and needed to fix them up here:

+	 * We also have to fix the relid sets of any FlattenedSubLink nodes in
+	 * the parent query.  (This could perhaps be done by ResolveNew, but it

Then when I got rid of FlattenedSubLink in e549722a8, I neglected
to remove that check.  So I think maybe we don't need it, but I've
not tested.

			regards, tom lane


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Bharath Rupireddy
Дата:
FAQ