Skip site navigation (1) Skip section navigation (2)

Re: wip: functions median and percentile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, David Fetter <david(at)fetter(dot)org>
Subject: Re: wip: functions median and percentile
Date: 2010-08-19 15:33:13
Message-ID: 4308.1282231993@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-rrreviewers
Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> I am sending a prototype implementation of functions median and
>> percentile. This implementation is very simple and I moved it to
>> contrib for this moment - it is more easy maintainable. Later I'll
>> move it to core.

> So if the entire result set fits in memory it would be nice to use the
> O(n) Quickselect algorithm -- which would only be a small change to
> the existing Quicksort code -- instead of sorting the entire set.

That seems like rather a lot of added infrastructure for functions whose
popularity is at best unknown.  I think we should KISS for the first
implementation.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-08-19 15:37:17
Subject: Re: refactoring comment.c
Previous:From: Alvaro HerreraDate: 2010-08-19 15:23:43
Subject: Re: PL/pgsSQL EXECUTE USING INTO

pgsql-rrreviewers by date

Next:From: Robert HaasDate: 2010-08-19 16:49:45
Subject: Re: wip: functions median and percentile
Previous:From: Greg StarkDate: 2010-08-19 14:50:23
Subject: Re: wip: functions median and percentile

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group