Re: wip: functions median and percentile

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: wip: functions median and percentile
Дата
Msg-id AANLkTimPZg_yd+XRuX84KsB_dzDURX=7F1k7HP+m3qsk@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wip: functions median and percentile  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список 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 по дате отправления:

Предыдущее
От: Hitoshi Harada
Дата:
Сообщение: Re: wip: functions median and percentile
Следующее
От: David Fetter
Дата:
Сообщение: Re: patch: SQL/MED(FDW) DDL