Re: wip: functions median and percentile

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: wip: functions median and percentile
Дата
Msg-id AANLkTi=yam_+-6vMeJVEyutBa3wizxSph0EE2PHddkK2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wip: functions median and percentile  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: wip: functions median and percentile  (David Fetter <david@fetter.org>)
Список pgsql-hackers
On Thu, Aug 19, 2010 at 11:33 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Greg Stark <gsstark@mit.edu> writes:
>> On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule <pavel.stehule@gmail.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.

+1.  I think the functions are useful, but the perfect is the enemy of the good.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgsSQL EXECUTE USING INTO