Re: BUG #12000: "CROSS JOIN" not equivalent to ","

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: BUG #12000: "CROSS JOIN" not equivalent to ","
Дата
Msg-id CAKFQuwZqhtxC8O-WK8U5S93UQTNyiq1R3_UPn4WLVPU81veFVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #12000: "CROSS JOIN" not equivalent to ","  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: BUG #12000: "CROSS JOIN" not equivalent to ","
Список pgsql-bugs
On Tuesday, November 18, 2014, Alvaro Herrera <alvherre@2ndquadrant.com>
wrote:

> David G Johnston wrote:
>
> > I personally find the use of "," in the FROM-clause to be poor form and
> its
> > even worse if you decide to mix both "," and explicit JOIN clauses.  If
> you
> > want to make this be explained better feel free to provide suggestions;
> but
> > I'd suggest you simply forget the fact that "FROM A, B" is even valid and
> > just use the proper joining keywords instead.
>
> Note that using explicit join form force the optimizer into some
> specific join order, depending on the join_collapse_limit parameter,
> whereas using commas gives it absolute freedom regardless of the
> parameter.
>
>
Only because the parameter used in that case is "from_collapse_limit"...

I'm not convinced there exists an example of micro-optimization where
mixing the two is a net gain that cannot be done in any other join-only way
and thus avoiding the mental context switch to know what binds where.  IIRC
with the default setting of the threshold GUCs the planner is equally
limited when choosing between two homogeneous use queries.

David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #12000: "CROSS JOIN" not equivalent to ","
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #12000: "CROSS JOIN" not equivalent to ","