|
Re: From Rule based optimizer to cost based optimizer [message #63314 is a reply to message #63313] |
Mon, 27 September 2004 03:49 |
dilip kumar
Messages: 111 Registered: December 2003
|
Senior Member |
|
|
Hi
you can easily shift to any optimizer when your session is running
execute a following command
alter session set optimizer_mode = rule/choose/fist_rows/all_rows
u can specify any one option. A rule reserve word will use RBO and others will use CBO.
but one point need to be remember if your operation is to get execution plan then first analyze all the objects of ur schema...b.cos even though u specify CBO but ur schema/objects are not analyzed then oracle will force to use RBO
regards
D.Dilip
|
|
|
Re: From Rule based optimizer to cost based optimizer [message #63324 is a reply to message #63313] |
Mon, 27 September 2004 11:48 |
croK
Messages: 170 Registered: April 2002
|
Senior Member |
|
|
Edit your init.ora file as follows:
optimizer_mode=CHOOSE
then, analyze tables and indexes in your db.
You can analyze all tables or some of them only.
But if not analyzed, oracle will choose rule based instead.
Can be also changed by alter session statement.
Best regards.
Oracle Consultant and remote DBA for hire.
|
|
|
Re: From Rule based optimizer to cost based optimizer [message #63464 is a reply to message #63313] |
Thu, 07 October 2004 03:39 |
Santosh Kaduskar
Messages: 44 Registered: October 2004
|
Member |
|
|
Oracle optimizer find out the best way to search data for oracle SQL-Engine.There r two type of optimizer
Rule base i.e.RBO & Cost Base i.e.CBO.
By default its RBO.we can change from RBO to CBO by
using command :
alter session set optimizer_mode=<mode>
<Mode> May be ALL_ROWS, FIRST_ROWS, RULE, FIRST_ROWS_1, FIRST_ROWS_10, FIRST_ROWS_100, FIRST_ROWS_1000.
For CBO we have to analyze the table first.
Thanks bye.
Santosh.
|
|
|