從Oracle9i開始,Oracle引入了"Peeking of User-Defined Bind Variables"特性,這個(gè)特性可以用來在存在數(shù)據(jù)傾斜時(shí)對執(zhí)行計(jì)劃糾偏。但是這一特性也可能引發(fā)一些副作用,所以O(shè)racle同時(shí)引入了一個(gè)內(nèi)部參數(shù)用于控制這一特性:
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 LIKE ’%&par%’
7 /
Enter value for par: peek
old 6: AND x.ksppinm LIKE ’%&par%’
new 6: AND x.ksppinm LIKE ’%peek%’
NAME VALUE DESCRIB
------------------------------ --------------------
_optim_peek_user_binds TRUE enable peeking of user binds
注釋:此參數(shù)缺省值為True,當(dāng)設(shè)置為False時(shí)將禁用peeking of user binds.
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 LIKE ’%&par%’
7 /
Enter value for par: peek
old 6: AND x.ksppinm LIKE ’%&par%’
new 6: AND x.ksppinm LIKE ’%peek%’
NAME VALUE DESCRIB
------------------------------ --------------------
_optim_peek_user_binds TRUE enable peeking of user binds
注釋:此參數(shù)缺省值為True,當(dāng)設(shè)置為False時(shí)將禁用peeking of user binds.