On Wed, Jun 4, 2014 at 12:50 AM, Noah Misch <n...@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: subquery_leftjoin_removal_v1.1.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to