oracle多条件外连接执行计划
(1)
select host.id from itr_host_v host left join itr_ci_ref r on host.id = r .to_ci
and r.from_template_id =
'0301010101' ;
(2)
select host.id from itr_host_v host, itr_ci_ref r where host.id = r. to_ci(+)
and r.from_template_id(+) =
'0301010101';
(3)
select host.id from itr_host_v host, itr_ci_ref r where host.id = r. to_ci(+)
and r.from_template_id =
'0301010101';
(4)select host.id from itr_host_v host left join itr_ci_ref r on host.id = r .to_ci
where r.from_template_id =
'0301010101' ;
上面三条sql,1==2,不等于3。3==4;1是多条件的左外连接。4是单条件左外连接。
(1)、(2)的执行计划为