Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 224402E00B1 for ; Thu, 6 Dec 2007 21:55:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 01245-08 for ; Thu, 6 Dec 2007 21:55:05 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 642162E0066 for ; Thu, 6 Dec 2007 21:55:05 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lB71t2oL006127; Thu, 6 Dec 2007 20:55:02 -0500 (EST) To: Matthew cc: pgsql-performance@postgresql.org Subject: Re: TB-sized databases In-reply-to: <17456.1196963738@sss.pgh.pa.us> References: <4544e0330711260904g45d893a8ub1731e245aa8fc84@mail.gmail.com> <13851.1196351131@sss.pgh.pa.us> <1196352866.4246.1304.camel@ebony.site> <200712051507.22745.xzilla@users.sourceforge.net> <1196933896.4255.340.camel@ebony.site> <20071206154212.GP5294@mathom.us> <15753.1196957598@sss.pgh.pa.us> <17456.1196963738@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 06 Dec 2007 12:55:38 -0500" Date: Thu, 06 Dec 2007 20:55:02 -0500 Message-ID: <6126.1196992502@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/90 X-Sequence-Number: 27906 I wrote: > Hmm. IIRC, there are smarts in there about whether a mergejoin can > terminate early because of disparate ranges of the two join variables. > Seems like it should be straightforward to fix it to also consider > whether the time-to-return-first-row will be bloated because of > disparate ranges. I've posted a proposed patch for this: http://archives.postgresql.org/pgsql-patches/2007-12/msg00025.php regards, tom lane