pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: martial.bizel@free.fr
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: out of memory
Date: Tue, 14 Feb 2006 17:03:38 +0100
Message-ID: <1139933018.43f1ff5a5e542@imp6-g19.free.fr> (raw)
In-Reply-To: <15115.1139931169@sss.pgh.pa.us>
References: <1139930651.43f1f61b04773@imp2-g19.free.fr>
	<15115.1139931169@sss.pgh.pa.us>

Thanks for your response,

I've made this request :

SELECT query_string, DAY.ocu from search_data.query_string,
 (SELECT SUM(occurence) as ocu, query
FROM daily.queries_detail_statistics
 WHERE date >= '2006-01-01' AND date <= '2006-01-30'
 AND portal IN (1,2)
 GROUP BY query
 ORDER BY ocu DESC
 LIMIT 1000) as DAY
 WHERE DAY.query=id;

and after few minutes, i've error "out of memory" with this execution plan :
Nested Loop  (cost=8415928.63..8418967.13 rows=1001 width=34)
   ->  Subquery Scan "day"  (cost=8415928.63..8415941.13 rows=1000 width=16)
         ->  Limit  (cost=8415928.63..8415931.13 rows=1000 width=12)
               ->  Sort  (cost=8415928.63..8415932.58 rows=1582 width=12)
                     Sort Key: sum(occurence)
                     ->  HashAggregate  (cost=8415840.61..8415844.56 rows=1582
width=12)
                           ->  Seq Scan on queries_detail_statistics 
(cost=0.00..8414056.00 rows=356922 width=12)
                                 Filter: ((date >= '2006-01-01'::date) AND (date
<= '2006-01-30'::date) AND (((portal)::text = '1'::text) OR ((portal)::text =
'2'::text)))
   ->  Index Scan using query_string_pkey on query_string  (cost=0.00..3.01
rows=1 width=34)
         Index Cond: ("outer".query = query_string.id)
(10 rows)

if HashAgg operation ran out of memory, what can i do ?

thanks a lot
martial

> martial.bizel@free.fr writes:
> > I've error "out of memory" with these traces :
>
> Doing what?
>
> > AggContext: -1976573952 total in 287 blocks; 25024 free (414 chunks);
> > -1976598976 used
> > DynaHashTable: 503439384 total in 70 blocks; 6804760 free (257 chunks);
> > 496634624 used
>
> I'd guess that a HashAgg operation ran out of memory ...
>
> 			regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>





view thread (23+ messages)  latest in thread

Message-ID: <1139933018.43f1ff5a5e542@imp6-g19.free.fr>
Permalink:  ../1139933018.43f1ff5a5e542@imp6-g19.free.fr/
Also on:    postgresql.org/message-id/1139933018.43f1ff5a5e542@imp6-g19.free.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: martial.bizel@free.fr, tgl@sss.pgh.pa.us
  Subject: Re: out of memory
  In-Reply-To: <1139933018.43f1ff5a5e542@imp6-g19.free.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox