Re: LEFT JOINs not optimized away when not needed

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: LEFT JOINs not optimized away when not needed
Дата
Msg-id CA+TgmoZSO7t+y3A4HF_tJ6cycQ2f0KUfOpEoMUfJM5DoHqO_3w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LEFT JOINs not optimized away when not needed  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LEFT JOINs not optimized away when not needed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Wed, Jul 9, 2014 at 12:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Tue, Jul 8, 2014 at 5:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Moshe Jacobson <moshe@neadwerx.com> writes:
>>>> On Tue, Jul 8, 2014 at 4:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>>> No.  There is nothing about GROUP BY in the join removal logic.
>
>>>> OK. Thank you. Is this something that would make sense to add?
>
>>> Dunno.  I don't recall any previous requests for such a thing, so I'd not
>>> be inclined to add it unless it can be done very cheaply (in terms of both
>>> code and runtime).
>
>> I thought this was exactly what was being discussed on the "Allowing
>> join removals for more join types" thread.
>
> No, this is a completely different thing.  The idea is that if the query
> is grouping on outer-relation columns, you don't need to care if the inner
> relation is unique or not, because it doesn't matter if there are multiple
> matches.

Oh...  but that would only work if it were grouping without
aggregation, right?  Seems awfully narrow.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LEFT JOINs not optimized away when not needed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LEFT JOINs not optimized away when not needed