Ronan Dunklau <ronan.dunk...@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