Re: Ordering behavior for aggregates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Ordering behavior for aggregates
Date
Msg-id 2349476.1670951114@sss.pgh.pa.us
Whole thread Raw
In response to Re: Ordering behavior for aggregates  (Ronan Dunklau <ronan.dunklau@aiven.io>)
List pgsql-hackers
Ronan Dunklau <ronan.dunklau@aiven.io> writes:
> 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.

That is *exactly* the position I do not accept.

I think it's fairly unlikely that a user would trouble to write ORDER BY
within an aggregate call if they didn't need it.  So my opinion of this
proposal is that it's a lot of work to create an optimization effect that
will be useless to nearly all users, and might actively break the queries
of some.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: Minimal logical decoding on standbys
Next
From: "David G. Johnston"
Date:
Subject: Re: Ordering behavior for aggregates