Re: Out of memory error during large hashagg

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Duncan <casey(at)pandora(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Out of memory error during large hashagg
Date: 2006-09-23 22:17:44
Message-ID: 28692.1159049864@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Casey Duncan <casey(at)pandora(dot)com> writes:
> select st_id, min(seed_id) as "initial_seed_id", count(*) as
> "seed_count" from seed group by st_id;

> The query plan and table stats are:

> QUERY PLAN
> -----------------------------------------------------------------------
> HashAggregate (cost=1362694.83..1365164.68 rows=164656 width=16)
> -> Seq Scan on seed (cost=0.00..964065.62 rows=53150562 width=16)

How many distinct st_id values are there really? The planner's
evidently expecting 164656 but I suppose that's wrong? What's
in pg_stats for st_id?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Casey Duncan 2006-09-24 02:52:17 Re: Out of memory error during large hashagg
Previous Message Victor Snezhko 2006-09-23 18:34:50 Re: Corruption of multibyte identifiers on UTF-8 locale