Skip site navigation (1) Skip section navigation (2)

Re: wip: functions median and percentile

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: wip: functions median and percentile
Date: 2010-10-01 08:46:45
Message-ID: AANLkTinqF5SKmFawSV+Nro3DLbY9wUJ_TNuq2ZWYFAmS@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-rrreviewers
Hello

2010/10/1 Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2010/9/26 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>> Hello,
>>
>> there is updated version - with support of window clause. The limits
>> are work_mem for using inside window aggregate or unlimited when it is
>> used as standard query.
>>
>> This patch needs a few work - can share a compare functionality with
>> tuplesort.c, but I would to verify a concept now.
>>
>> Comments?
>
> Sorry for delay. I read the patch and it seems the result is sane. For
> window function calls, I agree that the current tuplesort is not
> enough to implement median functions and the patch introduces its own
> memsort mechanism, although memsort has too much copied from
> tuplesort. It looks to me not so difficult to modify the existing
> tuplesort to guarantee staying in memory always if an option to do so
> is specified from caller. I think that option can be used by other
> cases in the core code.

There are two factors - a) tuplesorts should to uses only memory, b)
data can be sorted again and again. I'll look on possible tuplesort
modifications on weekend.

Pavel


>
> Regards,
>
>
> --
> Hitoshi Harada
>

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-10-01 09:13:02
Subject: Re: Using streaming replication as log archiving
Previous:From: Dean RasheedDate: 2010-10-01 08:35:12
Subject: Re: WIP: extensible enums

pgsql-rrreviewers by date

Next:From: Tom LaneDate: 2010-10-01 13:05:43
Subject: Re: wip: functions median and percentile
Previous:From: Hitoshi HaradaDate: 2010-10-01 08:24:23
Subject: Re: [HACKERS] top-level DML under CTEs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group