Home » RDBMS Server » Server Administration » cost based optimizer
cost based optimizer [message #60630] Fri, 20 February 2004 22:01 Go to next message
ora
Messages: 47
Registered: June 2002
Member
Hi,

I want to know that if the optimizer mode is set to COST then is the order of tables and order of conditions in a join query matters or not?

Means, consider the following query:

select t1.* from t1,t2,t3
where
t1.c1 = t2.c1
and t2.c1 = t3.c1

In above query, if the optimizer mode is COST so the order of t1,t2,t3 and the order of conditions in "where" clause matters or not?
Re: cost based optimizer [message #60634 is a reply to message #60630] Mon, 23 February 2004 00:45 Go to previous message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Hi,

Yes, if you use the cost based optimizer, the join order is determined by optimizer statistics.

Nevertheless, you can override the join order with hints. The "ORDERED" hint causes Oracle to join tables in the order in which they appear in the FROM clause. This is documented in the "Oracle9i Database Performance Tuning Guide and Reference" manual.

Best regards.

Frank
Previous Topic: Unix string concatination
Next Topic: DEALLOCATE UNUSED KEEP In Oracle 9i
Goto Forum:
  


Current Time: Fri Sep 20 10:31:23 CDT 2024