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

From Pavel Stehule
Subject Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support
Date
Msg-id 162867790912202101v411fb4b9if27a1bc7ab3447fa@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
2009/12/21 Greg Stark <gsstark@mit.edu>:
> Incidentally there are O(n) algorithms for finding the median (or any
> specific offset). It shouldn't be necessary to sort at all.

it is interesting information. It could to help with missing
optimalisations now.

Pavel

>
> I'm not sure which path this argues for - perhaps Tom's position that
> we need more optimiser infrastructure so we can see how to accomplish
> this. Perhaps it means you should really implement median() with an
> internal selection alagorithm and not depend on the optimizer at all.
>
>
> --
> greg
>


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Removing pg_migrator limitations
Next
From: Tom Lane
Date:
Subject: Re: Possible patch for better index name choosing