| From: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
|---|---|
| To: | Kirk Wythers <kwythers(at)umn(dot)edu> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: out of memory error on 3 table join | 
| Date: | 2006-12-12 00:04:38 | 
| Message-ID: | 1165881878.13508.12.camel@dogma.v10.wvs | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Mon, 2006-12-11 at 17:50 -0600, Kirk Wythers wrote:
> SELECT count (*) returns 33,061,700
> 
> 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)
> 
> However attempting the join
> met_data=# SELECT climate.year, solar.doy, sites.longname FROM  
> climate, sites, solar WHERE climate.id = sites.id AND solar.id =  
> sites.id AND climate.year = 1999;
> 
> gives the error.
> 
> 
> 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
> 
That's a client-side error. Why are you trying to return 33M records to
the client?
Regards,
	Jeff Davis
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Glen Parker | 2006-12-12 00:51:06 | PITR and moving objects between table spaces | 
| Previous Message | Kirk Wythers | 2006-12-11 23:50:53 | Re: out of memory error on 3 table join |