Re: Eliminating unnecessary left joins

From: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Eliminating unnecessary left joins
Date: 2007-04-16 09:51:24
Message-ID: 34608c0c0704160251l5249c747s56ee64236df66742@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Could you Bruce please add a TODO item for this feature?
The description could look something like this:

Eliminate the table T from the query/subquery if the following requirements
are satisfied:
1. T is left joined
2. T is referenced only in the join expression where it is left joined
3. the left join's join expression is a simple equality expression like
T1.C1=T2.C2; T1!=T2 and (T==T1 or T==T2)
4. the column of T in the join exression is the primary key of T

----------------------------------------------------

I hope it is comlete.
I think this is the simplest case, so we should start with this.

Thanks,
Otto

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2007-04-16 12:47:06 CREATE DATABASE foo OWNER bar
Previous Message Jacky Leng 2007-04-16 09:15:22 Why xlog stuff is done after the filetruncate op in smgrtruncate?