Re: propose to pushdown qual into EXCEPT

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Armor <yupengstone(at)qq(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: propose to pushdown qual into EXCEPT
Date: 2016-12-23 22:24:00
Message-ID: 20161223222400.ysgmlmv7pj7wh7ph@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "=?ISO-8859-1?B?QXJtb3I=?=" <yupengstone(at)qq(dot)com> writes:
> > Because PG does not pushdown qual to the none of the subquery. And I check the source code, find some comments in src/backend/optimizer/path/allpaths.c, which says "If the subquery contains EXCEPT or EXCEPT ALL set ops we cannot push quals into it, because that could change the results".
> > However, for this case, I think we can pushdown qual to the left most subquery of EXCEPT, just like other database does.
>
> That is not an adequate argument for such a change being okay. Postgres,
> with its extensible set of datatypes, has to be much more careful about
> the semantic soundness of optimizations than some other DBs do.

Can we use the record_image_ops mechanism here?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-12-23 22:24:58 Re: proposal: session server side variables
Previous Message Tom Lane 2016-12-23 22:16:57 Re: propose to pushdown qual into EXCEPT