Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 16BDE650EA7 for ; Tue, 2 Sep 2008 13:42:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 20727-04-3 for ; Tue, 2 Sep 2008 13:42:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail136085.authsmtp.co.uk (outmail136085.authsmtp.co.uk [62.13.136.85]) by postgresql.org (Postfix) with ESMTP id 20B99650537 for ; Tue, 2 Sep 2008 13:08:13 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m82G7asO006858; Tue, 2 Sep 2008 17:07:36 +0100 (BST) Received: from [192.168.0.2] (85-211-229-97.dyn.gotadsl.co.uk [85.211.229.97]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m82G7ZUL050718; Tue, 2 Sep 2008 17:07:35 +0100 (BST) Subject: Re: WIP Join Removal From: Simon Riggs To: Tom Lane Cc: Heikki Linnakangas , List pgsql-patches In-Reply-To: <14800.1220371325@sss.pgh.pa.us> References: <1220176372.4371.118.camel@ebony.2ndQuadrant> <48BC4127.30706@enterprisedb.com> <1220348487.4371.307.camel@ebony.2ndQuadrant> <48BD1374.4030504@enterprisedb.com> <1220352112.4371.349.camel@ebony.2ndQuadrant> <48BD1852.1070904@enterprisedb.com> <1220352898.4371.355.camel@ebony.2ndQuadrant> <14800.1220371325@sss.pgh.pa.us> Content-Type: text/plain Date: Tue, 02 Sep 2008 17:15:27 +0100 Message-Id: <1220372127.4371.456.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 423d4035-7909-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFaAdbflxB HGQLW1xEUVp7WWR/ aAwfZQBDYEtPQQdo WVZARU1QEQdtHhxP WxYcJR4YEnlGfX53 ZE4sX3NfXwp+d0Up Rk5XEHABbGdpdWEe BBRFfwJRdR5Kfh5E YlUrV3QKMjRJBC9q VzwLFgwaHRhkHWxq YzlFD1UTRw4xEzs7 WRkGdXVz X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:1186/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse 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=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/22 X-Sequence-Number: 7037 On Tue, 2008-09-02 at 12:02 -0400, Tom Lane wrote: > Simon Riggs writes: > >> Oh. How does the query look like after removing the join, then? > > > Same answer, just slower. Removing the join makes the access to a into a > > SeqScan, whereas it was a two-table index plan when both tables present. > > I don't really believe this... Yes, this will be changed. No need to review further at this stage. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support