Re: Plan weirdness. A sort produces more rows than the node beneath it

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Plan weirdness. A sort produces more rows than the node beneath it
Дата
Msg-id 3661332.1691163117@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Plan weirdness. A sort produces more rows than the node beneath it  (Dane Foster <studdugie@gmail.com>)
Ответы Re: Plan weirdness. A sort produces more rows than the node beneath it  (Dane Foster <studdugie@gmail.com>)
Список pgsql-performance
Dane Foster <studdugie@gmail.com> writes:
>> If the sort is the inner input to a merge join, this could reflect
>> mark-and-restore rescanning of the sort's output.  Are there a
>> whole lot of duplicate keys on the merge's other side?

> Yes. The course_id column's values repeat a LOT on the merge side.

Hmm.  The planner should avoid using a merge join if it knows that
to be true.  Maybe analyze'ing that table would prompt it to use
some other join method?

            regards, tom lane



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

Предыдущее
От: Dane Foster
Дата:
Сообщение: Re: Plan weirdness. A sort produces more rows than the node beneath it
Следующее
От: Dane Foster
Дата:
Сообщение: Re: Plan weirdness. A sort produces more rows than the node beneath it