Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 311CA6328DF for ; Thu, 27 May 2010 22:16:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 90815-09 for ; Fri, 28 May 2010 01:16:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4E78E632777 for ; Thu, 27 May 2010 22:16:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o4S1GQD1015063; Thu, 27 May 2010 21:16:26 -0400 (EDT) To: Scott Marlowe cc: Matthew Wakeling , pgsql-performance@postgresql.org Subject: Re: merge join killing performance In-reply-to: References: <21497.1274287983@sss.pgh.pa.us> Comments: In-reply-to Scott Marlowe message dated "Wed, 19 May 2010 20:07:39 -0600" Date: Thu, 27 May 2010 21:16:26 -0400 Message-ID: <15062.1275009386@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/245 X-Sequence-Number: 38829 Scott Marlowe writes: > So, Tom, so you think it's possible that the planner isn't noticing > all those nulls and thinks it'll just take a row or two to get to the > value it needs to join on? I've committed a patch for this, if you're interested in testing that it fixes your situation. regards, tom lane