Re: Eliminating unnecessary left joins - Mailing list pgsql-hackers

From Ottó Havasvölgyi
Subject Re: Eliminating unnecessary left joins
Date
Msg-id 34608c0c0704160251l5249c747s56ee64236df66742@mail.gmail.com
Whole thread Raw
In response to Re: Eliminating unnecessary left joins  ("Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>)
Responses Re: Eliminating unnecessary left joins  ("Nicolas Barbier" <nicolas.barbier@gmail.com>)
List 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
 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Adjusting index special storage for pg_filedump's convenience
Next
From: "Larry Rosenman"
Date:
Subject: CREATE DATABASE foo OWNER bar