Re: wip: functions median and percentile - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: wip: functions median and percentile
Date
Msg-id AANLkTimPZg_yd+XRuX84KsB_dzDURX=7F1k7HP+m3qsk@mail.gmail.com
Whole thread Raw
In response to Re: wip: functions median and percentile  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
2010/10/2 Kevin Grittner <Kevin.Grittner@wicourts.gov>:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hitoshi Harada <umi.tanuki@gmail.com> writes:
>>> Another suggestion?
>>
>> The implementation I would've expected to see is to do the sort
>> and then have two code paths for retrieving the median, depending
>> on whether the sort result is all in memory or not.
>
> Would it make sense to accumulate value/count pairs in a hash table,

Maybe, but it still has memory problem if the values vary, right? And
I'm not familiar with the algorithm of median other than what the
current patch does, so I'm not sure if hash table solution can be made
easily.

Regards,


-- 
Hitoshi Harada


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: wip: functions median and percentile
Next
From: David Fetter
Date:
Subject: Re: patch: SQL/MED(FDW) DDL