Hi, On 2018-08-08 16:55:22 +1200, Thomas Munro wrote: > On Fri, Jul 27, 2018 at 8:10 PM, David Fetter <da...@fetter.org> wrote: > > On Fri, Jul 27, 2018 at 02:55:26PM +1200, Thomas Munro wrote: > >> On Thu, Jul 26, 2018 at 7:14 AM, David Fetter <da...@fetter.org> wrote: > >> > Please find attached the next version, which passes 'make check'. > >> > >> ... but not 'make check-world' (contrib/postgres_fdw's EXPLAIN is > >> different). > > > > Please find attached a patch that does. > > > > It doesn't always pass make installcheck-world, but I need to sleep > > rather than investigate that at the moment. > > One observation I wanted to share: CTE scans inhibit parallelism today > (something we might eventually want to fix with shared tuplestores). > This patch therefore allows parallelism in some WITH queries, which > seems like a very valuable thing.
Might be interesting to see how big a difference it makes for TPC-DS. Currently the results are bad (as in many queries don't finish in a relevant time) because it uses CTEs so widely, and there's often predicates outside the CTE that could be pushed down. - Andres