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

From Tom Lane
Subject Re: wip: functions median and percentile
Date
Msg-id 26554.1286818631@sss.pgh.pa.us
Whole thread Raw
In response to Re: wip: functions median and percentile  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: wip: functions median and percentile
List pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> The estimate of 200 x 8K is below work_mem, so it uses a hash
> aggregate. In reality, each tuplesort allocates around 30K initially,
> so it very quickly uses over 1GB. A better estimate for the aggregate
> wouldn't improve this situation much.

Sure it would: an estimate of 30K would keep the planner from using
hash aggregation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: wip: functions median and percentile
Next
From: Dean Rasheed
Date:
Subject: Re: wip: functions median and percentile