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 4D90F9DCAA6 for ; Wed, 22 Mar 2006 00:31:48 -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 38680-05 for ; Wed, 22 Mar 2006 00:31:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8EC1D9DC959 for ; Wed, 22 Mar 2006 00:31:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k2M4VikB010013; Tue, 21 Mar 2006 23:31:44 -0500 (EST) To: "Craig A. James" cc: pgsql-performance@postgresql.org Subject: Re: Poor performance o In-reply-to: <4420A290.2050908@modgraph-usa.com> References: <43F38867.6010701@gpdnet.co.uk> <19510.1140036968@sss.pgh.pa.us> <19779.1140038874@sss.pgh.pa.us> <43F39E53.1020009@gpdnet.co.uk> <20781.1140046109@sss.pgh.pa.us> <19570.1142971720@sss.pgh.pa.us> <442080D1.5090803@modgraph-usa.com> <6629.1142983995@sss.pgh.pa.us> <4420A290.2050908@modgraph-usa.com> Comments: In-reply-to "Craig A. James" message dated "Tue, 21 Mar 2006 17:04:16 -0800" Date: Tue, 21 Mar 2006 23:31:43 -0500 Message-ID: <10012.1143001903@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200603/438 X-Sequence-Number: 17875 "Craig A. James" writes: > Tom Lane wrote: >> Given the sizes of the tables involved, you'd likely have to boost up >> work_mem before the planner would consider a hash join. What nondefault >> configuration settings do you have, anyway? > shared_buffers = 20000 > work_mem = 32768 > effective_cache_size = 300000 So for a 6M-row table, 32M work_mem would allow ... um ... 5 bytes per row. It's not happening :-( Try boosting work_mem by a factor of 100 and seeing whether a hash-based join actually wins or not. If so, we can discuss where the sane setting really falls, if not there's no point. regards, tom lane