Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Pre ordered aggregates, default ORDER BY clause for aggregates - median support
Date: 2009-12-21 05:01:35
Message-ID: 162867790912202101v411fb4b9if27a1bc7ab3447fa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/12/21 Greg Stark <gsstark(at)mit(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-21 05:03:09 Re: Possible patch for better index name choosing
Previous Message Bruce Momjian 2009-12-21 04:58:01 Re: Removing pg_migrator limitations