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 F18109DCAD3 for ; Tue, 21 Mar 2006 19:33:15 -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 85493-08 for ; Tue, 21 Mar 2006 19:33:18 -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 C331F9DCA83 for ; Tue, 21 Mar 2006 19:33:13 -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 k2LNXFxa006630; Tue, 21 Mar 2006 18:33:15 -0500 (EST) To: "Craig A. James" cc: pgsql-performance@postgresql.org Subject: Re: Poor performance o In-reply-to: <442080D1.5090803@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> Comments: In-reply-to "Craig A. James" message dated "Tue, 21 Mar 2006 14:40:17 -0800" Date: Tue, 21 Mar 2006 18:33:15 -0500 Message-ID: <6629.1142983995@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/434 X-Sequence-Number: 17871 "Craig A. James" writes: > It looks to me like the problem is the use of nested loops when a hash join should be used, but I'm no expert at query planning. 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? regards, tom lane