Re: Optimizer_Mode

  • From: Jared.Still@xxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 9 Mar 2004 15:07:17 -0800

Here is a test for anonymous pl/sql blocks only.

You will have to devise your own for stored procedures.


   v_mode varchar2(30);


   execute immediate 'alter session set optimizer_mode='
      || ''''
      || 'first_rows'
      || '''';

   select value into v_mode
   from v$parameter
   where name = 'optimizer_mode';



I curious why you are asking this.

Sounds like another Oracle Urban Legend to me.


Sent by: oracle-l-bounce@xxxxxxxxxxxxx
 03/08/2004 12:42 AM
 Please respond to oracle-l

        To:     <oracle-l@xxxxxxxxxxxxx>
        Subject:        Optimizer_Mode

Is optimizer_mode inside pl/sql program will be always 'ALL_ROWS'
irrespective of what has been set in instance or session level? 

Thanks and Regards,
Satheesh Babu.S

This message contains privileged and confidential information and is 
intended only for the individual named.If you are not the intended 
recipient you should not disseminate,distribute,store,print, copy or 
deliver this message.Please notify the sender immediately by e-mail if you 
have received this e-mail by mistake and delete this e-mail from your 
system.E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted,corrupted,lost,destroyed,arrive late 
or incomplete or contain viruses.The sender therefore does not accept 
liability for any errors or omissions in the contents of this message 
which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version.
Please see the official ORACLE-L FAQ:
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
Archives are at
FAQ is at

Other related posts: