Re: UPDATE with JOIN not using index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UPDATE with JOIN not using index
Дата
Msg-id 9689.1268754745@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UPDATE with JOIN not using index  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Ответы Re: UPDATE with JOIN not using index  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Список pgsql-general
Arnaud Lesauvage <arnaud.listes@codata.eu> writes:
> I am still a bit intrigued by the different query plans. Both query look
> very similar to me, so why does the planner make so different choices ?

Sometime in the future they might generate the same plan.  Right now the
planner's ability to optimize sub-SELECTs is pretty limited, and so you
typically get a nestloop-like plan even if some other join style would
be faster.  (It's not all the planner's fault either --- we'd need to
tweak the executor so that it could throw the appropriate error for more
than one join partner row, etc.)

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Move to core xml from contrib/xml2
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: UPDATE with JOIN not using index