Re: wip: functions median and percentile

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: wip: functions median and percentile
Дата
Msg-id AANLkTimMoQpzCoL1OLASh0B5KPOG8tAm-3y=PhxbZS4y@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wip: functions median and percentile  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: wip: functions median and percentile  (Hitoshi Harada <umi.tanuki@gmail.com>)
Список pgsql-hackers
On Sun, Oct 3, 2010 at 7:06 AM, Hitoshi Harada <umi.tanuki@gmail.com> wrote:
> And I'm now thinking about how to make median happen in window
> aggregate.

If you were to do this by extending tuplesort what extra features
would tuplesort need?

Would tuplesort need the ability to insert additional records into an
already sorted array and maintain the sort?
Would it need the ability to remove records from the sorted set?
Would it need the ability to do a partial sort (the QuickSelect algorithm)?
The ability to do random access on disk sets?

How do existing windowed aggregates work if you specify an order by on
the aggregate? Do they resort for every output row?

Does the spec give a way to run an arbitrary subselect on the current
window? I wonder if we need more powerful machinery anyways to handle
these cases.

-- 
greg


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Heads up: upcoming back-branch releases
Следующее
От: Hitoshi Harada
Дата:
Сообщение: Re: [RRR] top-level DML under CTEs