Ble*_*eek 2 sql oracle plsql inner-join query-performance
准备好的查询结构和性能之间是否存在差异
select *
from employee e
join division d
on e.eid = d.eid
and e.div = d.div
and e.level > 5
and e.startDate > sysdate - interval '60' month
;
Run Code Online (Sandbox Code Playgroud)
和:
select *
from employee e
join division d
on e.eid = d.eid
and e.div = d.div
where
e.level > 5
and e.startDate > sysdate - interval '60' month
;
Run Code Online (Sandbox Code Playgroud)
这两个查询在语法上是等效的。它们将产生相同的结果。
我不希望它们之间有任何性能差异。无论是将条件放在where子句中还是放在s的on子句中join,优化器都应该生成相同的执行计划。
| 归档时间: |
|
| 查看次数: |
63 次 |
| 最近记录: |