Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g88hE-0007mJ-MZ for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Oct 2018 18:50:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g88hC-0001Pi-BO for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Oct 2018 18:49:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g88hC-0001Pb-4Q for pgsql-hackers@lists.postgresql.org; Thu, 04 Oct 2018 18:49:58 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g88h9-0005Lx-7d for pgsql-hackers@postgresql.org; Thu, 04 Oct 2018 18:49:57 +0000 Received: by fetter.org (Postfix, from userid 1001) id 5ACB841D70; Thu, 4 Oct 2018 20:49:53 +0200 (CEST) Date: Thu, 4 Oct 2018 20:49:53 +0200 From: David Fetter To: Andreas Karlsson Cc: Thomas Munro , Andrew Gierth , Pg Hackers Subject: Re: Early WIP/PoC for inlining CTEs Message-ID: <20181004184952.GO25294@fetter.org> References: <87sh48ffhb.fsf@news-spur.riddles.org.uk> <20180725054236.GB17411@fetter.org> <87bmavfjhy.fsf@news-spur.riddles.org.uk> <20180725191447.GE17411@fetter.org> <20180727081058.GN17411@fetter.org> <20181003155720.GG25294@fetter.org> <5bad579d-7a99-74de-2311-b4f049da8b40@proxel.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bad579d-7a99-74de-2311-b4f049da8b40@proxel.se> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Oct 04, 2018 at 11:22:32AM +0200, Andreas Karlsson wrote: > On 10/03/2018 05:57 PM, David Fetter wrote: > >Is there any meaningful distinction between "inlining," by which I > >mean converting to a subquery, and predicate pushdown, which > >would happen at least for a first cut, at the rewrite stage? > > Sorry, but I do not think I understand your question. The ability to push > down predicates is just one of the potential benefits from inlining. Oracle appears to have such a distinction, and it appears we don't. https://medium.com/@hakibenita/be-careful-with-cte-in-postgresql-fca5e24d2119 Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate