Re: Help with nested loop left join performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Help with nested loop left join performance
Дата
Msg-id 11673.1140620645@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Help with nested loop left join performance  (Richard Huxton <dev@archonet.com>)
Список pgsql-performance
Richard Huxton <dev@archonet.com> writes:
> George Woodring wrote:
>>      FROM
>>          settop_billing
>>      LEFT OUTER JOIN
>>          (dhct JOIN dhct_davic USING(mac))
>>      USING
>>          (mac)
>>      WHERE
>>          region='GTown1E' AND node='1E012'

> With 7.4 I seem to remember that explicit JOINs force the evaluation
> order, but I'm not if even later versions will rewrite your query. It's
> too early in the morning for me to figure out if it's safe in all cases.

CVS HEAD can re-order left joins in common cases, but no existing
release will touch the ordering of outer joins at all.

It's impossible to tell here which tables the WHERE-clause restrictions
actually bear on, so there's no way to say whether a different join
order would help.  My guess though is that George may be stuck --- in
general you can't move a join into or out of the right side of a left
join without changing the answers.

            regards, tom lane

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: --pls reply ASAP
Следующее
От: Brendan Duddridge
Дата:
Сообщение: Re: LIKE query on indexes