Search Postgresql Archives

Re: out of memory error on 3 table join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux