The join order of an access plan - in the absence of any leading or ordered hints - is determined strictly like everything else by the CBO: the join order with the lowest estimated cost wins. And the selectivity and cardinality estimates play a big role in determining the cardinality and thus cost estimates.
To answer your question "does oracle use histograms and distinctness in determining join order?" outright: Yes, but only indirectly: histograms and distinctness determine the cardinality -> therefore the cost estimates -> therefore the join order.
And lastly, you can not compare the results, i.e. plans, of two different parses. Each is in its own world.


At 10:04 AM 11/5/2003, you wrote:
im not concerned about the type of join. Im strictly concerned about the join order. does oracle use histograms and distinctness in determining join order? The odd thing is that it chose a different join order on these tables earlier and on 'similiar' joins(ie large number of records and only 4 distinct values on the join column) oracle chooses the proper join 'order'
>

Wolfgang Breitling
Oracle7, 8, 8i, 9i OCP DBA
Centrex Consulting Corporation
http://www.centrexcc.com



-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Wolfgang Breitling INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to