Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 59A3B632975 for ; Mon, 29 Mar 2010 14:27:18 -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 90946-04 for ; Mon, 29 Mar 2010 17:27:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148095.authsmtp.com (outmail148095.authsmtp.com [62.13.148.95]) by mail.postgresql.org (Postfix) with ESMTP id BDE696324E2 for ; Mon, 29 Mar 2010 14:27:07 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt8.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o2THR55L028755; Mon, 29 Mar 2010 18:27:05 +0100 (BST) Received: from [192.168.0.2] (88-110-156-192.dynamic.dsl.as9105.com [88.110.156.192]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o2THR0iF035550; Mon, 29 Mar 2010 18:27:00 +0100 (BST) Subject: Re: enable_joinremoval From: Simon Riggs To: Robert Haas Cc: pgsql-hackers@postgresql.org In-Reply-To: <603c8f071003290637q14d431f7j90afabd6fd2ec952@mail.gmail.com> References: <1269851630.3684.3636.camel@ebony> <603c8f071003290637q14d431f7j90afabd6fd2ec952@mail.gmail.com> Content-Type: text/plain Date: Mon, 29 Mar 2010 18:26:59 +0100 Message-Id: <1269883619.3684.3954.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit X-Server-Quench: 48d236d7-3b58-11df-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFagxbYFhD HGQLWlREUVV7W2R/ awofZQ1DY0tOQQRv VlZIS1BNEQ1vHhxP WRx6KntyLnNGe3t1 YEYsXHNZXgp+fRJ/ QUgAEnAFN2JodWEe BBZFfwMGeR5Kfh1H bFR/BnsFYjBJBC9q VzwTFhsSEA9kHWxY RAgHKV8lQ0EKGCQx QhccFDFH X-Authentic-SMTP: 61633235383639.1015:706/Kp X-AuthFastPath: 255 X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/1167 X-Sequence-Number: 159943 On Mon, 2010-03-29 at 09:37 -0400, Robert Haas wrote: > In many > cases it's not horribly difficult to work around because you can do > SELECT * FROM ... instead of your original select list, but there > might be some cases with multiple levels of views where it isn't that > easy. I think it would be good to add this back. People have asked me how they would know whether join removal has worked. If there is a workaround that works for most cases, I think that might be all we need. Do you have an example where that doesn't work, so we can judge how common that would be? -- Simon Riggs www.2ndQuadrant.com