tation of CTE optimization in Orca
optimizer. It may be useful, though architecture is completely different.
 Optimization of Common Table Expressions in MPP Database Systems
Sent via pgsql-hackers mailing list (
30.04.2017, 08:58, "Craig Ringer" : On 30 Apr. 2017 13:28, "Andres Freund" wrote:On 2017-04-30 00:28:46 -0400, Tom Lane wrote:> There's already a pretty large hill to climb here in the way of> breaking peoples' expectations about CTEs being
of the whole query, that almost sure is too expensive.
So I wonder, is it possible to estimate a join predicate selectivity
against CTE subquery result and inline it if selectivity is "high" enough?
(If it is possible the same can be applied to the first case.)
I would be glad to