Re: Join questions
От | Tom Lane |
---|---|
Тема | Re: Join questions |
Дата | |
Msg-id | 10852.998495683@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Join questions (Bruno Wolff III <bruno@wolff.to>) |
Список | pgsql-general |
Bruno Wolff III <bruno@wolff.to> writes: > I have two related questions about joins. > One is that if you don't group with parenthesis, what order are they > done in? Left to right. A JOIN B JOIN C == (A JOIN B) JOIN C. > Will the optimizer be able to pick the better order of the two possible > orders in the following example or do I need to try both and pick one? The latter. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/explicit-joins.html This behavior is not graven on stone tablets (at least not for inner joins), but it was easy to do and is useful for cases where you *don't* want the planner to try all possible join orders. So it'll probably stay like that at least for a release or two, until we have enough field experience to see whether people like it this way or not. regards, tom lane
В списке pgsql-general по дате отправления: