Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id F0389B5DC47 for ; Wed, 2 Nov 2011 21:18:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08055-02 for ; Thu, 3 Nov 2011 00:18:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mbx.knossos.net.nz (mbx.knossos.net.nz [202.160.48.10]) by mail.postgresql.org (Postfix) with ESMTP id 5AB4BB5DC4A for ; Wed, 2 Nov 2011 21:18:09 -0300 (ADT) Received: from [10.1.1.3] (60-234-150-59.bitstream.orcon.net.nz [60.234.150.59]) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id pA30HntS009871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 3 Nov 2011 13:17:50 +1300 Message-ID: <4EB1DDAD.9000407@archidevsys.co.nz> Date: Thu, 03 Nov 2011 13:17:49 +1300 From: Gavin Flower Organization: ArchiDevSys User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Igor Neyman CC: Robert Haas , Tom Lane , Jay Levitt , pgsql-performance@postgresql.org Subject: Re: Guide to PG's capabilities for inlining, predicate hoisting, flattening, etc? References: <29918.1320244719@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201111/59 X-Sequence-Number: 45570 On 03/11/11 09:22, Igor Neyman wrote: > >> -----Original Message----- >> From: Robert Haas [mailto:robertmhaas@gmail.com] >> Sent: Wednesday, November 02, 2011 11:13 AM >> To: Tom Lane >> Cc: Jay Levitt; pgsql-performance@postgresql.org >> Subject: Re: Guide to PG's capabilities for inlining, predicate >> hoisting, flattening, etc? >> ....... >> ....... >> Perhaps we could let people say >> something like WITH x AS FENCE (...) when they want the fencing >> behavior, and otherwise assume they don't (but give it to them anyway >> if there's a data-modifying operation in there). >> >> .... >> .... >> -- >> Robert Haas >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > > Hints.... here we come :) > Is that a hint??? [Sorry, my perverse sense of humour kicked in] I too would like CTE's to take part in optimisation - as I don't like the mass slaughter of kittens, but I still want to pander to my speed addiction. So I think that having some sort of fence mechanism would be good. Cheers, Gavin