Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2C579633C8B for ; Thu, 20 May 2010 11:28:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53712-04 for ; Thu, 20 May 2010 14:28:17 +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 5A2CF6364B9 for ; Thu, 20 May 2010 11:28:18 -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 o4KESCRN003830; Thu, 20 May 2010 10:28:12 -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, 20 May 2010 10:28:12 -0400 Message-ID: <3829.1274365692@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/112 X-Sequence-Number: 38696 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? Could be. I don't have time right now to chase through the code, but that sounds like a plausible theory. regards, tom lane