Re: Expand applicability of aggregate's sortop optimization

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Expand applicability of aggregate's sortop optimization
Дата
Msg-id CAApHDvqiqBWCf8E5+KeViH-_p3oNC-5EkYGH7-L3f5w5PPR_pQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Expand applicability of aggregate's sortop optimization  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Expand applicability of aggregate's sortop optimization
Re: Expand applicability of aggregate's sortop optimization
Список pgsql-hackers
On Thu, 9 May 2024 at 12:26, David Rowley <dgrowleyml@gmail.com> wrote:
> I wonder if we should also consider as an alternative to this to just
> have an aggregate support function, similar to
> SupportRequestOptimizeWindowClause that just nullifies the aggorder /
> aggdistinct fields for Min/Max aggregates on types where there's no
> possible difference in output when calling the transition function on
> rows in a different order.
>
> Would that apply in enough cases for you?

One additional thought is that the above method would also help
eliminate redundant sorting in queries with a GROUP BY clause.
Whereas, the can_minmax_aggs optimisation is not applied in that case.

David



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