On Tue, Dec 13, 2022 at 9:45 AM Ronan Dunklau <ronan.dunk...@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.

Reply via email to