Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Patrik Hall <phall(at)phall(dot)kdsoft(dot)fi>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions
Date: 2000-03-03 14:09:37
Message-ID: 38BFC7A1.3343FFEC@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Patrik Hall wrote:
>
> I am in need of median, quartile and percentile functions in postgres.
>
> Has anybody implemented any of them allready?
>
> I have the functions temporary solved in PHP right now but they are really
> slow as datarows are increasing in count.

I don't know much about php, but there is a perl stats module called
Statistics::Descriptive, available at CPAN, that has what you seek and
seems pretty quick (I haven't measured it). I find that doing these
sorts of functions in perl tends overall to be faster than doing them
in postgres, though that would not be my intuition.

Cheers,
Ed Loehr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message M.Mazurek 2000-03-03 14:26:55 Re: [GENERAL] FOREIGN KEY syntax
Previous Message Chris Carbaugh 2000-03-03 14:08:26 Help with installing 6.5.3 on RedHat6.1 - specifying template