Re: Unwanted expression simplification in PG12b2

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Unwanted expression simplification in PG12b2
Дата
Msg-id CA+TgmobyFoj3dy+mLbdp_51HG00V=3CbjPBk9sM84U1actC=7Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unwanted expression simplification in PG12b2  ("Finnerty, Jim" <jfinnert@amazon.com>)
Список pgsql-hackers
On Mon, Sep 23, 2019 at 9:20 PM Finnerty, Jim <jfinnert@amazon.com> wrote:
> If the function was moved to the FROM clause where it would be executed as a lateral cross join instead of a target
listexpression, how would this affect the cost-based positioning of the Gather?
 

I think you'd end up turning what is now a Seq Scan into a Nested Loop
with a Seq Scan on one side. I think the computation of the target
list would be done by the Function Scan or Result node on the other
side of the Nested Loop, and couldn't move anywhere else. The planner
would consider putting the Gather either on top of the Nested Loop or
on top of the Seq Scan, and the former would probably win. So I think
this would give the desired behavior, but I haven't thought about it
very hard.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL12 and older versions of OpenSSL