Re: out of memory error on 3 table join

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: out of memory error on 3 table join
Дата
Msg-id 20061212104925.GA28714@svana.org
обсуждение исходный текст
Ответ на Re: out of memory error on 3 table join  (Kirk Wythers <kwythers@umn.edu>)
Список pgsql-general
On Mon, Dec 11, 2006 at 05:50:53PM -0600, Kirk Wythers wrote:
> met_data=# SELECT count(*) FROM climate, sites, solar WHERE
> climate.id = sites.id AND solar.id = sites.id AND climate.year = 1999;
> ----------
> 33061700
> (1 row)

<snip>

> psql(394) malloc: *** vm_allocate(size=396742656) failed (error code=3)
> psql(394) malloc: *** error: can't allocate region
> psql(394) malloc: *** set a breakpoint in szone_error to debug
> out of memory

Basically, it failed to allocate nearly 400MB of memory to store the
results. The question is: do you want ot store all 400MB at once?

If you don't, use a cursor.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Shoaib Mir"
Дата:
Сообщение: Re: any api in libpq to get the number of connections
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Metadata from NEW and OLD constructs?