Re: inner join removal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: inner join removal
Date: 2010-07-08 19:05:20
Message-ID: 29761.1278615920@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Jul 8, 2010 at 2:48 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think it might work out better if you ask "what
>> additional conditions are needed in order to prove that this inner join
>> can commute with this left join", and then work at being able to prove
>> that. (It's entirely likely that the planner isn't currently gathering
>> the right information for solving that problem.)

> We have to avoid putting much of anything into the critical path where
> we're trying out different join orders - we want to figure it out
> earlier and, if possible, by examining each relation just once.

Right, but look for example at the logic involved with the current outer
join transformation identity #3, which can't be applied unless the join
predicate is strict for the left-hand side. We avoid doing the dogwork
to test that more than once. I'm hoping that something similar will
work for this problem. But it's way premature to say much about that
without a mathematical characterization of the extra conditions needed
to make the joins commutable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-07-08 19:07:55 Re: inner join removal
Previous Message Robert Haas 2010-07-08 19:00:00 Re: inner join removal