1. 对大表不频繁地串行全表扫描的场景
2. Db Cache Size高速缓冲大小远小于表的大小的场景
不推荐在以下场景中开启该11g自动判断direct path read特性:
1. 从运行稳定的老版本(9i、10g)升级到11g的数据库
2. 对大表频繁地串行全表扫描的场景
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
col name for a30
col value for a20
col DESCRIB for a60
set linesize 140 pagesize 1400
SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
FROM SYS.x$ksppi x, SYS.x$ksppcv y
WHERE x.inst_id = USERENV (‘Instance’)
AND y.inst_id = USERENV (‘Instance’)
AND x.indx = y.indx
AND (x.ksppinm =’_small_table_threshold’ or x.ksppinm=’_serial_direct_read’);
NAME VALUE DESCRIB
—————————— ——————– ————————————————————
_small_table_threshold 1143 lower threshold level of table size for direct reads
_serial_direct_read auto enable direct read in serial
SQL> alter system set db_cache_size=1024M scope=spfile;
System altered.
RESTART INSTANCE:
SQL> col name for a30
SQL> col value for a20
SQL> col DESCRIB for a60
SQL> set linesize 140 pagesize 1400
SQL>
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
2 FROM SYS.x$ksppi x, SYS.x$ksppcv y
3 WHERE x.inst_id = USERENV (‘Instance’)
4 AND y.inst_id = USERENV (‘Instance’)
5 AND x.indx = y.indx
6 AND (x.ksppinm =’_small_table_threshold’ or x.ksppinm=’_serial_direct_read’);
NAME VALUE DESCRIB
—————————— ——————– ————————————————————
_small_table_threshold 2522 lower threshold level of table size for direct reads
_serial_direct_read auto enable direct read in serial
“As of 11.2.0.2 the legal settings are
true, false, always, auto, and never
true is the same effect as always
false is the same effect as auto
Default value is “auto”
Setting event 10949 or event 10354 may also have the side effect of making oracle behave as if _serial_direct_read = never”