Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0EAE29FB20D for ; Wed, 27 Sep 2006 12:20:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 94797-10 for ; Wed, 27 Sep 2006 15:20:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id E5CC69FB1E6 for ; Wed, 27 Sep 2006 12:20:24 -0300 (ADT) Received: from 10.10.1.93 ([10.10.1.93]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 27 Sep 2006 15:20:22 +0000 Received: from localhost.localdomain by mail.g2switchworks.com; 27 Sep 2006 10:19:25 -0500 Subject: Re: Merge Join vs Nested Loop From: Scott Marlowe To: Tobias Brox Cc: Tom Lane , pgsql-performance@postgresql.org In-Reply-To: <20060927150512.GE17834@oppetid.no> References: <20060926193553.GA27268@oppetid.no> <719.1159308596@sss.pgh.pa.us> <20060927094803.GA11245@oppetid.no> <1159369111.4643.0.camel@localhost.localdomain> <20060927150512.GE17834@oppetid.no> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 27 Sep 2006 10:19:24 -0500 Message-Id: <1159370365.4643.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/353 X-Sequence-Number: 21039 On Wed, 2006-09-27 at 17:05 +0200, Tobias Brox wrote: > [Scott Marlowe - Wed at 09:58:30AM -0500] > > Have you tried chaning the cpu_* cost options to see how they affect > > merge versus nested loop? > > As said in the original post, increasing any of them shifts the planner > towards nested loops instead of merge_join. I didn't check which one of > the cost constants made the most impact. So, by decreasing them, you should move away from nested loops then, right? Has that not worked for some reason?