From: | David Rowley <dgrowley(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dilip kumar <dilip(dot)kumar(at)huawei(dot)com> |
Subject: | Re: Allowing join removals for more join types |
Date: | 2014-07-05 21:16:25 |
Message-ID: | CAHoyFK-JNKnWNs9FFuBOoX9joOxBx2uPKbwW3mEeuaei-Pa08g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6 July 2014 03:20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > Attached is a delta patch between version 1.2 and 1.3, and also a
> > completely updated patch.
>
> Just to note that I've started looking at this, and I've detected a rather
> significant omission: there's no check that the join operator has anything
> to do with the subquery's grouping operator. I think we need to verify
> that they are members of the same opclass, as
> relation_has_unique_index_for does.
>
>
hmm, good point. If I understand this correctly we can just ensure that the
same operator is used for both the grouping and the join condition.
I've attached a small delta patch which fixes this, and also attached the
full updated patch.
Regards
David Rowley
Attachment | Content-Type | Size |
---|---|---|
subquery_leftjoin_removal_v1.4.patch | application/octet-stream | 18.8 KB |
subquery_leftjoin_removal_v1.4_delta.patch | application/octet-stream | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2014-07-05 23:24:43 | Re: DISTINCT with btree skip scan |
Previous Message | Andrew Gierth | 2014-07-05 20:56:02 | Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY |