Re: Allowing join removals for more join types - Mailing list pgsql-hackers

From David Rowley
Subject Re: Allowing join removals for more join types
Date
Msg-id CAApHDvr-3quZ4pXRn-Qo_ccw5wsmkwT9T_ShR_Jnpf3HfKAyTw@mail.gmail.com
Whole thread Raw
In response to Re: Allowing join removals for more join types  (Noah Misch <noah@leadboat.com>)
Responses Re: Allowing join removals for more join types  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Wed, Jun 4, 2014 at 12:50 AM, Noah Misch <noah@leadboat.com> wrote:
As a point of procedure, I recommend separating the semijoin support into its
own patch.  Your patch is already not small; delaying non-essential parts will
make the essential parts more accessible to reviewers.


In the attached patch I've removed all the SEMI and ANTI join removal code and left only support for LEFT JOIN removal of sub-queries that can be proved to be unique on the join condition by looking at the GROUP BY and DISTINCT clause.

Example:

SELECT t1.* FROM t1 LEFT OUTER JOIN (SELECT value,COUNT(*) FROM t2 GROUP BY value) t2 ON t1.id = t2.value;

Regards

David Rowley

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: IMPORT FOREIGN SCHEMA statement
Next
From: Andres Freund
Date:
Subject: Re: Wait free LW_SHARED acquisition - v0.2