Re: WIP: Join push-down for foreign tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: Join push-down for foreign tables
Дата
Msg-id 11845.1321543484@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: Join push-down for foreign tables  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: WIP: Join push-down for foreign tables  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> When the FDW recognizes it's being asked to join a ForeignJoinPath and a 
> ForeignPath, or two ForeignJoinPaths, it throws away the old SQL it 
> constructed to do the two-way join, and builds a new one to join all 
> three tables.

It should certainly not "throw away" the old SQL --- that path could
still be chosen.

> That seems tedious, when there are a lot of tables 
> involved. A FDW like the pgsql_fdw that constructs an SQL query doesn't 
> need to consider pairs of joins. It could just as well build the SQL for 
> the three-way join directly. I think the API needs to reflect that.

> I wonder if we should have a heuristic to not even consider doing a join 
> locally, if it can be done remotely.

I think this is a bad idea.  It will require major restructuring of the
planner, and sometimes it will fail to find the best plan, in return for
not much.  The nature of join planning is that we investigate a lot of
dead ends.
        regards, tom lane


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

Предыдущее
От: Susanne Ebrecht
Дата:
Сообщение: Re: Removing postgres -f command line option
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: ISN was: Core Extensions relocation