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

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

Thanks Tom. Here's more info:

What have you got work_mem set to?

40960

What's the actual number of groups
> (target_page_id values)?

Approximately 40 million (I'll have a more precise number when the query
finishes running ).

Maybe this helps?

crystal=> select null_frac, n_distinct, correlation from pg_stats where
tablename = 'page_page_link' and attname = 'target_page_id';
null_frac | n_distinct | correlation
-----------+------------+-------------
0 | 550017 | 0.240603
(1 row)

Mason

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mason Hale 2007-06-14 21:09:42 Re: Hash Aggregate plan picked for very large table == out of memory
Previous Message Tom Lane 2007-06-14 20:55:11 Re: Hash Aggregate plan picked for very large table == out of memory