Re: Early WIP/PoC for inlining CTEs - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Early WIP/PoC for inlining CTEs
Date
Msg-id 20180725002742.vuqswve4oq4g5aie@alap3.anarazel.de
Whole thread Raw
In response to Re: Early WIP/PoC for inlining CTEs  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
On 2018-07-25 01:08:44 +0100, Andrew Gierth wrote:
> >>>>> "Andres" == Andres Freund <andres@anarazel.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


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Early WIP/PoC for inlining CTEs
Next
From: Michael Paquier
Date:
Subject: Re: Add SKIP LOCKED to VACUUM and ANALYZE