Re: Trouble with explicit joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trouble with explicit joins
Дата
Msg-id 12900.1098401533@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trouble with explicit joins  (Dmitry Tkach <dmitry@openratings.com>)
Ответы Re: Trouble with explicit joins
Список pgsql-sql
Dmitry Tkach <dmitry@openratings.com> writes:
> I suppose, this is because the planner takes the order, in which the 
> tables appear in the explicit joins as some kind of a hint to how I want 
> that query to be executed,

It's not a "hint", it's a requirement.  In general, changing the order
in which outer joins are executed changes the results.

There are some cases in which it is safe to rearrange the order, but
determining this takes close analysis of the join conditions, and we
don't (yet) have any code to do that.  So the planner must be
conservative and take your join order as gospel.
        regards, tom lane


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

Предыдущее
От: André Toscano
Дата:
Сообщение: Functions return a select in a table, which data type I must use? (Brazilian User)
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Re: Trouble with explicit joins