Re: Early WIP/PoC for inlining CTEs

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jeremy Finzel <finzelj(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Early WIP/PoC for inlining CTEs
Date: 2019-01-11 21:25:23
Message-ID: CAHyXU0zVzBBeW+xpKLxWWwYD5pyK2+KwpM26JM=eZ58hfYOf4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 24, 2018 at 6:10 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> My read of the concensus (in which I am in the majority, so I might be
> biased) is that we do want inlining to be the default. We were thinking
> that it'd be necessary to provide a way to force inlining on the SQL
> level for individual CTEs.

This is correct. Suggesting that we need syntax to disabling inlining
at the CTE level, and/or GUC to control the behavior (which I agree
should be defualted to inline). Something like
enable_cte_inline=true; I'm not very enthusiastic about explicitly
breaking intentionally introduced optimization fences and then forcing
people to inject our OFFSET 0 hack. This is just too unpleasant to
contemplate...what happens if we come up with a better implemntation
of OFFSET? yuck.

Thanks for providing this, CTE plan problems are a real bugaboo.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-11 21:31:01 Re: Three animals fail test-decoding-check on REL_10_STABLE
Previous Message Tomas Vondra 2019-01-11 21:18:32 Re: [HACKERS] PATCH: multivariate histograms and MCV lists