Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6A71C632CA9 for ; Wed, 17 Feb 2010 01:34:49 -0400 (AST) 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 84954-04 for ; Wed, 17 Feb 2010 05:34:39 +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 DA5866329C2 for ; Wed, 17 Feb 2010 01:34:38 -0400 (AST) 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 o1H5YbuV019450; Wed, 17 Feb 2010 00:34:37 -0500 (EST) To: Ben Chobot cc: "Kevin Grittner" , pgsql-performance@postgresql.org Subject: Re: 8.1 -> 8.4 regression In-reply-to: <5FDB08C1-3835-4B80-835D-B44F483C3227@silentmedia.com> References: <4B791AFF020000250002F2DD@gw.wicourts.gov> <8D572A50-01C7-464B-8D0D-FCF19C53BC9C@silentmedia.com> <1376.1266254788@sss.pgh.pa.us> <5FDB08C1-3835-4B80-835D-B44F483C3227@silentmedia.com> Comments: In-reply-to Ben Chobot message dated "Mon, 15 Feb 2010 09:35:13 -0800" Date: Wed, 17 Feb 2010 00:34:37 -0500 Message-ID: <19449.1266384877@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.185 tagged_above=-10 required=5 tests=BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201002/262 X-Sequence-Number: 37683 Ben Chobot writes: > Awesome, that did the trick. Thanks Tom! So I understand better, why is my case not the normal, better case? Well, the short answer is that the 8.4 changes here are in the nature of two steps forward and one step back. The long-term goal is to increase the planner's ability to choose among different join orders; but we're getting rid of one restriction at a time, and sometimes the interactions of those restrictions produce unwanted results like the older code being able to find a better plan than the new code can. > (I assume the long-term fix is post-9.0, right?) Yeah, fraid so. I've been mostly buried in non-planner work in the 9.0 cycle, but hope to get back to this and other problems in the next cycle. regards, tom lane