From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | "Todd A(dot) Cook" <tcook(at)blackducksoftware(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Relyea, Mike" <Mike(dot)Relyea(at)xerox(dot)com>, pgsql-general(at)postgresql(dot)org, Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu> |
Subject: | Re: Out of memory error in 8.1.0 Win32 |
Date: | 2006-06-22 18:55:56 |
Message-ID: | 87r71h10lf.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
"Todd A. Cook" <tcook(at)blackducksoftware(dot)com> writes:
"Todd A. Cook" <tcook(at)blackducksoftware(dot)com> writes:
> QUERY PLAN
> -------------------------------------------------------------------------
> HashAggregate (cost=1163446.13..1163448.63 rows=200 width=4)
> -> Seq Scan on oom_tab (cost=0.00..867748.42 rows=59139542 width=4)
>
> The row estimitate for oom_tab is close to the actual value. Most of
> the values are unique, however, so the result should have around 59M
> rows too.
ouch. it's estimating 200 distinct values. The estimates for distinct values
are known to be unreliable but they shouldn't be *that* bad. Do you have a few
hundred extremely common values and then a few million other values?
What does this say:
select * from pg_statistic where starelid = (select oid from pg_class where relname = 'oom_tab')
You may need to reanalyze and maybe increase the statistics target
(possibly by a lot). It may be interesting to compare the results of the above
query before and after analyzing too.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-06-22 18:58:11 | Re: OT: publicly available databases? |
Previous Message | Tom Lane | 2006-06-22 18:53:04 | Re: Out of memory error in 8.1.0 Win32 |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Woodward | 2006-06-22 19:00:46 | Re: vacuum, performance, and MVCC |
Previous Message | Tom Lane | 2006-06-22 18:53:04 | Re: Out of memory error in 8.1.0 Win32 |