Re: Out of memory error in 8.1.0 Win32

Поиск
Список
Период
Сортировка
От Todd A. Cook
Тема Re: Out of memory error in 8.1.0 Win32
Дата
Msg-id 449AE2C6.5080601@blackducksoftware.com
обсуждение исходный текст
Ответ на Re: Out of memory error in 8.1.0 Win32  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Out of memory error in 8.1.0 Win32  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Out of memory error in 8.1.0 Win32  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Tom Lane wrote:
>
> Misestimated hash aggregation, perhaps?  What is the query and what does
> EXPLAIN show for it?  What have you got work_mem set to?

oom_test=> \d oom_tab
     Table "public.oom_tab"
  Column |  Type   | Modifiers
--------+---------+-----------
  val    | integer |

oom_test=> explain select val,count(*) from oom_tab group by val;
                                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.

I've tried it with work_mem set to 32M, 512M, 1G, and 2G.  It fails in
all cases, but it hits the failure point quicker with work_mem=32M.

-- todd

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Out of memory error in 8.1.0 Win32
Следующее
От: Tom Lane
Дата:
Сообщение: Re: auto-vacuum & Negative "anl" Values