Re: Early WIP/PoC for inlining CTEs

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeremy Finzel <finzelj(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Early WIP/PoC for inlining CTEs
Date: 2018-07-25 00:27:42
Message-ID: 20180725002742.vuqswve4oq4g5aie@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-07-25 01:08:44 +0100, Andrew Gierth wrote:
> >>>>> "Andres" == Andres Freund <andres(at)anarazel(dot)de> writes:
>
> Andres> Even in queries with a non-0 OFFSET you can push down in a
> Andres> number of cases,
>
> really?

Yea. I guess it's a bit dependant on what kind of behaviour you consider
as "pushing down". I'm doubtful it's worth the analytical complexity on
ensuring it's safe, however. With knowledge from the outer query you
e.g. can: trim the target list; remove outer joins below the OFFSET 0;
push down a restriction into an outer join below the OFFSET if that's
guaranteed to only return max one row, and not needed if not matching
the restrcition. I'm sure you can come up with more?

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-25 01:06:32 Re: Add SKIP LOCKED to VACUUM and ANALYZE
Previous Message Andrew Gierth 2018-07-25 00:08:44 Re: Early WIP/PoC for inlining CTEs