Re: Removing unneeded self joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Removing unneeded self joins
Дата
Msg-id 18757.1526508831@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Removing unneeded self joins  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Removing unneeded self joins  (David Rowley <david.rowley@2ndquadrant.com>)
Re: Removing unneeded self joins  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> On 17 May 2018 at 08:44, Simon Riggs <simon@2ndquadrant.com> wrote:
>> What I was advocating was an approach that varies according to the
>> query cost, so we don't waste time trying to tune the heck out of OLTP
>> queries, but for larger queries we might take a more considered
>> approach.

> That's tricky. If we do this, it should be done before Path
> generation, so not much is known about the costs in those case.

Yeah.  It'd have to be a very heuristic thing that doesn't account
for much beyond the number of relations in the query, and maybe their
sizes --- although I don't think we even know the latter at the
point where join removal would be desirable.  (And note that one of
the desirable benefits of join removal is not having to find out the
sizes of removed rels ... so just swapping that around doesn't appeal.)

            regards, tom lane


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [BUGFIX] amcanbackward is not checked before building backwardindex paths