X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 122AA9DC82D for ; Wed, 15 Feb 2006 04:34:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69226-02 for ; Wed, 15 Feb 2006 04:34:08 -0400 (AST) X-Greylist: whitelisted by SQLgrey- Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by postgresql.org (Postfix) with ESMTP id 484B49DC803 for ; Wed, 15 Feb 2006 04:34:05 -0400 (AST) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp1-g19.free.fr (Postfix) with ESMTP id A009A69240 for ; Wed, 15 Feb 2006 09:34:06 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id 6B9CC2CDD0; Wed, 15 Feb 2006 09:34:06 +0100 (MET) Received: from wormhole.x-echo.com (wormhole.x-echo.com [193.252.148.11]) by imp6-g19.free.fr (IMP) with HTTP for ; Wed, 15 Feb 2006 09:34:06 +0100 Message-ID: <1139992446.43f2e77e50629@imp6-g19.free.fr> Date: Wed, 15 Feb 2006 09:34:06 +0100 From: martial.bizel@free.fr To: pgsql-performance@postgresql.org Subject: Re: out of memory References: <1139930651.43f1f61b04773@imp2-g19.free.fr> <15115.1139931169@sss.pgh.pa.us> <1139933018.43f1ff5a5e542@imp6-g19.free.fr> <1139933201.22740.179.camel@state.g2switchworks.com> <1139933720.43f20218cfe3a@imp6-g19.free.fr> <1139934097.22740.182.camel@state.g2switchworks.com> <1139934753.43f20621ba78d@imp1-g19.free.fr> <1139935835.22740.188.camel@state.g2switchworks.com> In-Reply-To: <1139935835.22740.188.camel@state.g2switchworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 193.252.148.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.656 required=5 tests=[AWL=0.106, NO_REAL_NAME=0.55] X-Spam-Score: 0.656 X-Spam-Level: X-Archive-Number: 200602/295 X-Sequence-Number: 17281 Good morning, I've increased sort_mem until 2Go !! and the error "out of memory" appears again. Here the request I try to pass with her explain plan, Nested Loop (cost=2451676.23..2454714.73 rows=1001 width=34) -> Subquery Scan "day" (cost=2451676.23..2451688.73 rows=1000 width=16) -> Limit (cost=2451676.23..2451678.73 rows=1000 width=12) -> Sort (cost=2451676.23..2451684.63 rows=3357 width=12) Sort Key: sum(occurence) -> HashAggregate (cost=2451471.24..2451479.63 rows=3357 width=12) -> Index Scan using test_date on queries_detail_statistics (cost=0.00..2449570.55 rows=380138 width=12) Index Cond: ((date >= '2006-01-01'::date) AND (date <= '2006-01-30'::date)) Filter: (((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) (11 rows) Any new ideas ?, thanks MB. > On Tue, 2006-02-14 at 10:32, martial.bizel@free.fr wrote: > > command explain analyze crash with the "out of memory" error > > > > I precise that I've tried a lot of values from parameters shared_buffer and > > sort_mem > > > > now, in config file, values are : > > sort_mem=32768 > > and shared_buffer=30000 > > OK, on the command line, try increasing the sort_mem until hash_agg can > work. With a 4 gig machine, you should be able to go as high as needed > here, I'd think. Try as high as 500000 or so or more. Then when > explain analyze works, compare the actual versus estimated number of > rows. >