pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Andreas Karlsson <andreas@proxel.se>
Cc: David Fetter <david@fetter.org>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Early WIP/PoC for inlining CTEs
Date: Fri, 05 Oct 2018 01:40:05 +0100
Message-ID: <87y3bdckvu.fsf@news-spur.riddles.org.uk> (raw )
In-Reply-To: <5bad579d-7a99-74de-2311-b4f049da8b40@proxel.se >
References: <87sh48ffhb.fsf@news-spur.riddles.org.uk >
<20180725054236.GB17411@fetter.org >
<87bmavfjhy.fsf@news-spur.riddles.org.uk >
<20180725191447.GE17411@fetter.org >
<CAEepm=0MKV3MnR4Dn5RkXsK+RnmHEFitqiG4PcBhXtBK4JOoWw@mail.gmail.com >
<20180727081058.GN17411@fetter.org >
<dccb37dd-2f52-dbd7-a4c4-72a5853f4838@proxel.se >
<e02af96a-3e25-5de4-09a4-a7ebf3452184@proxel.se >
<20181003155720.GG25294@fetter.org >
<5bad579d-7a99-74de-2311-b4f049da8b40@proxel.se >
>>>>> "Andreas" == Andreas Karlsson <andreas@proxel.se> writes:
> 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?
Yes.
Andreas> Sorry, but I do not think I understand your question. The
Andreas> ability to push down predicates is just one of the potential
Andreas> benefits from inlining.
Consider the difference between (in the absence of CTE inlining):
-- inline subquery with no optimization barrier (qual may be pushed down)
select * from (select x from y) s where x=1;
-- inline subquery with optimization barrier (qual not pushed down)
select * from (select x from y offset 0) s where x=1;
-- CTE with materialization
with s as (select x from y) select * from s where x=1;
--
Andrew (irc:RhodiumToad)
view thread (112+ messages) latest in thread
Message-ID: <87y3bdckvu.fsf@news-spur.riddles.org.uk>
Permalink: ../87y3bdckvu.fsf@news-spur.riddles.org.uk/
Also on: postgresql.org/message-id/87y3bdckvu.fsf@news-spur.riddles.org.uk
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andrew@tao11.riddles.org.uk, andreas@proxel.se, david@fetter.org, thomas.munro@enterprisedb.com
Subject: Re: Early WIP/PoC for inlining CTEs
In-Reply-To: <87y3bdckvu.fsf@news-spur.riddles.org.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox