Re: Removing unneeded self joins

Поиск
Список
Период
Сортировка
От Jonathan S. Katz
Тема Re: Removing unneeded self joins
Дата
Msg-id E238CD3A-993A-4FD1-8920-988B00C01478@postgresql.org
обсуждение исходный текст
Ответ на Re: Removing unneeded self joins  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> On May 16, 2018, at 1:58 PM, Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2018-05-16 12:26:48 -0400, Robert Haas wrote:
>> Also, I'm not sure that I believe that it's always easy to avoid
>> generating such queries.
>
> Yea. There's obviously plenty cases where ORMs just want to make the
> database hurt. But especially when building a join between a number of
> tables based on various fields, it's not going to be easy for the ORM to
> figure out which ones can be safely omitted. It'd need similar
> optimization as we'd have to do, without having the infrastructure core
> PG has.  And then there's, as you say, views etc…

Are there specific examples of what the ORM code is that generated
the SQL? I’m more curious to see what people are writing that
generates such code. As earlier mentioned we could always report back
to the specific ORM maintainer(s) such examples and see if they could
tweak.

Jonathan

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: [PROPOSAL] Shared Ispell dictionaries