View Single Post

   
  #9 (permalink)  
Old 04-09-2008, 07:32 AM
Tom Lane
 
Posts: n/a
Default Re: out of memory during query execution

Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Dec 20, 2005 at 01:35:03PM +0100, DANTE ALEXANDRA wrote:
>> You will find below the explain plan of one of the queries which has
>> finished with "out of memory". This query contains aggregate and a
>> sub-select with 6 joins :


> 1. Firstly, it could be the Hash node. Does the estimated number of
> matches in part (96000 rows) match reality?


Actually, the hash on "supplier" (3000000 rows) looks like a bigger
risk. But if this is 8.1 then there is code in there to spill oversize
hash tables to disk, so I don't understand where the memory is going.

The "out of memory" failure should have provoked a MemoryContextStats
report in the postmaster log. Are there a bunch of lines like
%s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used
and if so could we see 'em?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote