Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Is Richard Niemiec Right
In Richard Niemiec's book "Oracle 9i Performance Tuning, Tips &
Techniques", Chapter 9, advanced SQL tuning, he mentioned about selecting
the driving table for table joins, he mentioned
1) we should put most selective condtion in the where clause to eliminate
the most unqualified rows
2) in the three table join situation, we should put the table which join
with the other two tables as the driving table, and put the driving table as
first table after the from clause.
Is this statement true?
By testing, I found that changing the table position in the from clause or changing the position of join conditions at where clause does not affect optimizer at all, if you do not put ORDERED, or RULE hint.
My understanding is, optimizer will calculate all the possibility of all possible join conditions up to 80,000 or something like that, so it should not matter where you put your table, or which join conditions first, unless it has more than 10 table joins.
You imput is highly appreciated. Received on Sat Sep 20 2003 - 12:33:12 CDT