From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com> |
Cc: | Mario Becroft <mb(at)true(dot)group>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Ilya Shkuratov <motr(dot)ilya(at)ya(dot)ru>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Serge Rielau <serge(at)rielau(dot)com> |
Subject: | Re: CTE inlining |
Date: | 2017-05-05 02:57:21 |
Message-ID: | 894e6690-a9cf-cc94-f457-94c7d9c120dd@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/04/2017 07:04 PM, Tom Lane wrote:
> Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com> writes:
>> We're carefully maintaining this bizarre cognitive dissonance where we
>> justify the need for using this as a planner hint at the same time as
>> denying that we have a hint. That makes it hard to make progress here.
>> I think there's fear that we're setting some kind of precedent by
>> admitting what we already have.
>
> I think you're overstating the case. It's clear that there's a
> significant subset of CTE functionality where there has to be an
> optimization fence. The initial implementation basically took the
> easy way out by deeming *all* CTEs to be optimization fences. Maybe
> we shouldn't have documented that behavior, but we did. Now we're
> arguing about how much of a compatibility break it'd be to change that
> planner behavior. I don't see any particular cognitive dissonance here,
> just disagreements about the extent to which backwards compatibility is
> more important than better query optimization.
Exactly.
One thought, is that we treat a CTE in a similar way to foreign tables,
with the same set of push downs.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-05-05 03:00:02 | Re: CTE inlining |
Previous Message | Thomas Munro | 2017-05-05 02:54:05 | Re: modeling parallel contention (was: Parallel Append implementation) |