Re: How could this SQL be optimized?
The SQL compiler constructs permutations of tables in the FROM clause of a query. The qualified inner join (x inner join y on p syntax) does not dictate a join order but the outer join syntax does. Otherwise join order is subject to change by the compiler's decision.
The first order tried by the optimizer is the initial left to right order of the FROM clause. The compiler remembers its best result so far attained in trying various compilations, so it will not explore branches of the table permutation tree which, while incomplete, exceed the cost of the best complete result so far. Thus a good guess of initial table order by the programmer may save compilation time.
Subject
Views
Written By
Posted
2430
May 29, 2014 11:26PM
1232
May 30, 2014 02:41AM
1320
May 30, 2014 02:46AM
Re: How could this SQL be optimized?
1174
August 21, 2014 11:03PM
1185
August 22, 2014 01:54AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.