Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support
Date
Msg-id 52AFDB8E-124E-46A0-9B62-987C789077E9@hi-media.com
Whole thread Raw
In response to Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi from a real user :)

Le 20 déc. 2009 à 22:08, Tom Lane a écrit :
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> b) general support for "preordered aggregates".
>
> I think that we've already expanded the capabilities of aggregates
> a great deal for 8.5, and we should let it sit as-is for a release
> or two and see what the real user demand is for additional features.

All we can have in PostgreSQL without needing to resort to either PLs or application code is worth it from here, and I
canalready picture the smiling on our developers face when I say them median() is there by default. 

> I'm particularly concerned by the fact that the feature set is already
> far out in front of what the planner can optimize effectively (e.g.,
> there's no ability to combine the work when multiple aggregates need the
> same sorted data).  The more features we add on speculation, the harder
> it's going to be to close that gap.
>
> Another risk is that features added now might preclude adding others
> later.

Now, I have no idea if augmenting the aggregate properties with an optional sorting step is the right approach, but it
soundsright on spot (general enough without being over engineering). I guess it would give the planner the same
informationas if the user did type the extra order by himself, so I'm not sure how much your remarks would apply? 

I mean we already have explicit user ordering in aggregates at call site, adding the exact same information in the
aggregatedefinition itself surely isn't going to be such a change there? 

Regards,
--
dim

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support
Next
From: Tom Lane
Date:
Subject: Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support