Re: fix cost subqueryscan wrong parallel cost

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: fix cost subqueryscan wrong parallel cost
Дата
Msg-id 20220415101059.GW26620@telsasoft.com
обсуждение исходный текст
Ответ на Re: fix cost subqueryscan wrong parallel cost  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
On Fri, Apr 15, 2022 at 05:16:44PM +0800, Richard Guo wrote:
> Not related to this topic but I noticed another problem from the plan.
> Note the first Sort node which is to unique-ify the result of the UNION.
> Why cannot we re-arrange the sort keys from (a, b, c) to (a, c, b) so
> that we can avoid the second Sort node?

I don't know, but it's possible there's a solution related to commit db0d67db2
"Optimize order of GROUP BY keys" - DISTINCT is the same as GROUP BY k1, ...,
kN.  I guess UNION [DISTINCT] should learn to use GROUP BY rather than
DISTINCT?

-- 
Justin



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

Предыдущее
От: "bucoo@sohu.com"
Дата:
Сообщение: Re: Re: fix cost subqueryscan wrong parallel cost
Следующее
От: Robert Haas
Дата:
Сообщение: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)