Re: How does Postgres estimate the memory needed for sorting/aggregating

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How does Postgres estimate the memory needed for sorting/aggregating
Date: 2017-01-25 21:47:41
Message-ID: 5610e7aa-c7c9-0db2-0c37-527920046810@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/25/2017 12:59 PM, Thomas Kellerer wrote:
> So here is my question: how does Postgres estimate/know the memory
> needed for the aggregation? Or does it dynamically resize the memory
> if the initial assumption was wrong?

my understanding is it fits as much as it can into a work_mem sized
allocation, and if thats not enough uses temporary files and multiple
passes.

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2017-01-25 22:00:11 Re: How does Postgres estimate the memory needed for sorting/aggregating
Previous Message Tomas Vondra 2017-01-25 21:46:56 Re: How does Postgres estimate the memory needed for sorting/aggregating