Re: Extremely inefficient merge-join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extremely inefficient merge-join
Дата
Msg-id 3610142.1616014055@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Extremely inefficient merge-join  (Marcin Gozdalik <gozdal@gmail.com>)
Ответы Re: Extremely inefficient merge-join
Список pgsql-performance
Marcin Gozdalik <gozdal@gmail.com> writes:
> Sometimes Postgres will choose very inefficient plan, which involves
> looping many times over same rows, producing hundreds of millions or
> billions of rows:

Yeah, this can happen if the outer side of the join has a lot of
duplicate rows.  The query planner is aware of that effect and will
charge an increased cost when it applies, so I wonder if your
statistics for the tables being joined are up-to-date.

            regards, tom lane



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

Предыдущее
От: Marcin Gozdalik
Дата:
Сообщение: Extremely inefficient merge-join
Следующее
От: Marcin Gozdalik
Дата:
Сообщение: Re: Extremely inefficient merge-join