Re: LEFT JOINs not optimized away when not needed

Поиск
Список
Период
Сортировка
От Moshe Jacobson
Тема Re: LEFT JOINs not optimized away when not needed
Дата
Msg-id CAJ4CxLkWyRASRNOZLcsgKP=aZ+T7xsaZ-MnWBfD9Zzh_YThs4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LEFT JOINs not optimized away when not needed  (Moshe Jacobson <moshe@neadwerx.com>)
Список pgsql-bugs
On Thu, Jul 10, 2014 at 12:12 PM, Moshe Jacobson <moshe@neadwerx.com> wrote=
:

> It's reasonable to hope that if the aggregated column isn't selected,
>> the join will get removed, but cars (person_id) is not unique.
>>
>
> Exactly. But the same should be true even if c.plate_number is not
> aggregated in the view def.
> As long as it's not selected, the output should list one row per person_i=
d
> and the cars table should be removed from the join.
> What I've just described is our most common use case.
>

Oops, what I said may not have been clear.
The view def wouldn't have a GROUP BY in most of our use cases.
The GROUP BY would actually be used to group all of the columns selected
from the view.


Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc. <http://www.neadwerx.com>
2323 Cumberland Parkway =C2=B7 Suite 201 =C2=B7 Atlanta, GA 30339

"Quality is not an act, it is a habit." -- Aristotle

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Compile fails on AIX 6.1
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Missing file versions for a bunch of dll/exe files in Windows builds