Re: [HACKERS] CTE inlining

2017-05-09 Thread Ilya Shkuratov
tation of CTE optimization in Orca optimizer. It may be useful, though architecture is completely different. [1] Optimization of Common Table Expressions in MPP Database Systems (http://www.vldb.org/pvldb/vol8/p1704-elhelw.pdf) Ilya Shkuratov -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] CTE inlining

2017-05-01 Thread Ilya Shkuratov
  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

[HACKERS] CTE inlining

2017-04-29 Thread Ilya Shkuratov
planning 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