Re: join removal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: join removal
Дата
Msg-id 8212.1269701421@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: join removal  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: join removal
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'm not totally sure about this but I think it's possible to do this
> without a combinatorial search.  Suppose we just iterate over the list
> of
> SpecialJoinInfo structures and look for those where jointype is LEFT,
> delay_upper_joins is false, and min_righthand is a singleton; and then
> consider the removability of a join between min_lefthand and
> min_righthand.  I might be missing a case, but I think whatever answer
> we get from that calculation is the answer, period.  Adding more
> relations to the LHS won't change anything.

Hmm ... that last isn't obvious to me.  The current computation in
join_is_removable is clearly capable of making different decisions at
different join levels, depending on whether any outputs of the RHS are
seen to be required above the current join.  It might be that in
practice it has to succeed with the min LHS if it's going to succeed
anywhere, but I'm not convinced.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: changes to documentation build
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Performance improvement for unique checks