_optimizer_use_histograms是一个CBO隐藏参数,目前所知该参数负责让CBO optimizer启用/禁用Histogram(This parameter enables/disables the usage of histograms by the optimizer.)
不过诡异的是这个参数在10gR2、12cR1中均存在,但是在11gR2中消失了。。。
11gR2:
SQL> select * from v$version;
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
PL/SQL Release 11.2.0.3.0 – Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 – Production
NLSRTL Version 11.2.0.3.0 – Production
SQL> alter session set “_optimizer_use_histograms”=false;
alter session set “_optimizer_use_histograms”=false
*
ERROR at line 1:
ORA-02248: invalid option for ALTER SESSION
12cR1:
SQL> select * from v$version;
BANNER
——————————————————————————–
CON_ID
———-
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production
0
PL/SQL Release 12.1.0.1.0 – Production
0
CORE 12.1.0.1.0 Production
0
BANNER
——————————————————————————–
CON_ID
———-
TNS for Linux: Version 12.1.0.1.0 – Production
0
NLSRTL Version 12.1.0.1.0 – Production
0
SQL> alter session set “_optimizer_use_histograms”=false;
Session altered.
10gR2:
SQL> select * from v$version;
BANNER
—————————————————————-
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bi
PL/SQL Release 10.2.0.5.0 – Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 – Production
NLSRTL Version 10.2.0.5.0 – Production
SQL> alter session set “_optimizer_use_histograms”=false;
Session altered.
Comment