可传递性(Transitivity)
利用可传递性对目标SQL做简单的等价改写仅仅试用于CBO。
1. 简单的谓语传递
t1.c1=t2.c1 and t1.c1=10 等价于 t1.c1=t2.c1 and t1.c1=10 and t2.c1=10
2. 连接谓语传递
t1.c1=t2.c1 adn t2.c1=t3.c1 等价于 t1.c1=t2.c1 and t2.c1=t3.c1 and t1.c1=t3.c1
3. 外连接谓语传递
t1.c1=t2.c1(+) and t1.c1=10 等价于 t1.c1=t2.c1(+) and t1.c1=10 and t2.c1(+)=10
_optimizer_max_permutations限制,只会考虑下面的2000 的值得连接方式。
SQL> select a.ksppinm name, b.ksppstvl value, a.ksppdesc description
from x$ksppi a, x$ksppcv b
where a.indx = b.indx and a.ksppinm like '_optimizer_max_permutations';
NAME VALUE
-------------------------------------------------------------------------------- -------------------
_optimizer_max_permutations 2000