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