Re: Allowing join removals for more join types

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Rowley <dgrowley(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-16 08:57:00
Message-ID: CAApHDvoYSB-htvyhkfpi7ovzRxoDtt-+K8zk4Rypp4Hr26JszQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 16, 2014 at 1:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > I've attached an updated patch which puts in some fast path code for
> > subquery type joins. I'm really not too sure on a good name for this
> > function. I've ended up with query_supports_distinctness() which I'm not
> > that keen on, but I didn't manage to come up with anything better.
>
> I've committed this with some mostly but not entirely cosmetic changes.
>

Great! thanks for taking the time to give me guidance on this and commit it
too.

Simon, thank you for taking the time to review the code.

Notably, I felt that pathnode.c was a pretty questionable place to be
> exporting distinctness-proof logic from, and after some reflection decided
> to move those functions to analyzejoins.c; that's certainly a better place
> for them than pathnode.c, and I don't see any superior third alternative.
>
>
That seems like a good change. Also makes be wonder a bit
why clause_sides_match_join is duplicated in joinpath.c and analyzejoins.c,
is this just so that it can be inlined?

Thanks also for making the change to create_unique_path to make use of the
new query_supports_distinctness function.

Regards

David Rowley

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Viswanatham kirankumar 2014-07-16 09:23:01 [TODO] Process pg_hba.conf keywords as case-insensitive
Previous Message Magnus Hagander 2014-07-16 08:41:37 Re: [bug fix] pg_ctl always uses the same event source