Re: Ordering behavior for aggregates

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Ordering behavior for aggregates
Дата
Msg-id CAKFQuwZ0yx81sXNWzW6GHEX+nFzjgX_w8jLExxF9u+uxZfJp1w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Ordering behavior for aggregates  (Ronan Dunklau <ronan.dunklau@aiven.io>)
Ответы Re: Ordering behavior for aggregates
Список pgsql-hackers
On Tue, Dec 13, 2022 at 9:45 AM Ronan Dunklau <ronan.dunklau@aiven.io> wrote:
Le mardi 13 décembre 2022, 16:13:34 CET Tom Lane a écrit :
> Accordingly, I find nothing at all attractive in this proposal.
> I think the main thing it'd accomplish is to drive users back to
> the bad old days of ordering-by-subquery, if they have a requirement
> we failed to account for.

I think the ability to mark certain aggregates as being able to completely
ignore the ordering because they produce exactly the same results is still a
useful optimization.


I seriously doubt that users are adding unnecessary ORDER BY clauses to their aggregates. The more compelling use case would be existing ORMs that produce such problematic SQL - are there any though?

I'm more keen on the idea of having the system understand when an ORDER BY is missing - that seems like what users are more likely to actually do.  But it doesn't seem all that useful given the lack of aggregates that would actually use it meaningfully.

David J.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Ordering behavior for aggregates
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: New strategies for freezing, advancing relfrozenxid early