Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer joins order

Status
Not open for further replies.

naga5566

Technical User
Mar 14, 2003
90
US
Hi ,

I have 3 table joined as
A left outer join B left outer join C.But when i create the report with the objects from these 3 table ,it constructs the SLQ as C right outer join b right outer join A.Ofcourse both mean the same,but when i run this queries the left outer join query works more efficiently than the right outer join .Its almost 3 times faster than the right outer join.I ran both these queries for about 20 times.I believe both these queries should execute the same way and same time.(Not sure how optimizer evaluates these).Is there a way i can make it construct the left outer join instead of right outer join.
One more thing,when i select the object from only A and B tables,it creates the sql based on the sequence of the objects i select.If i select objects from A first and B next it creates A left outer join B and vice versa.But when i include objects from C it always created right outer join irrepsective of the order.
This may sound strange or stupid,but believe me there a lot diffence in the execution times among these 2.
Ofcourse the final results are same.
FYI ,
I am using BO 6.5 and oracle .
 
For ORACLE there is a additional setting in the oracle.prm file that is called 'reverse table weight'. This should effect which tables are first approached in resolving the query. Did you analyze the explain plans of both queries? I bet that there will be differences there

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top