Re: Hash Aggregate plan picked for very large table == out of memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mason Hale" <masonhale(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Hash Aggregate plan picked for very large table == out of memory
Date: 2007-06-14 20:55:11
Message-ID: 20377.1181854511@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mason Hale" <masonhale(at)gmail(dot)com> writes:
> SELECT target_page_id, min(created_at)
> FROM page_page_link
> GROUP BY 1;

> The page_page_link table has ~130 million rows.

> After analyzing the table, the planner picks a hash aggregate plan, which
> results in an out of memory error.

What have you got work_mem set to? What's the actual number of groups
(target_page_id values)?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mason Hale 2007-06-14 21:04:00 Re: Hash Aggregate plan picked for very large table == out of memory
Previous Message Rodrigo De León 2007-06-14 20:53:26 Re: Historical Data Question