Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change OPTIMIZER_MODE setting in oracle?

Tags:

oracle

How to change OPTIMIZER_MODE setting in oracle?

like image 451
anand Avatar asked Dec 17 '22 19:12

anand


2 Answers

You can change OPTIMIZER_MODE, with alter command as shown below,

alter session set OPTIMIZER_MODE = RULE;
alter session set OPTIMIZER_MODE = choose;
like image 60
Sankar Ganesh PMP Avatar answered Feb 06 '23 19:02

Sankar Ganesh PMP


ALTER SESSION SET OPTIMIZER_MODE  = RULE;

or if you need to make changes for all system:

ALTER SYSTEN SET OPTIMIZER_MODE = RULE SCOPE=SPFILE;

Use

 SELECT VALUE FROM v$parameter WHERE NAME = 'optimizer_mode'

to check the result.

like image 30
ceth Avatar answered Feb 06 '23 19:02

ceth