在同事的帮助下学习到的优化方法:
select /*+ rule*/t1.Pid,t1.Pname,
decode(t2.Pstatus,
'5',
'5 - 未审核',
'7',
'7 - 删除',
'9',
'9 - 已审核') Pstatus,
from t1,
t2
where 1 = 1
AND t1.Psdate >= '20100907'
and t1.Pedate <= '20100907'
and t1.Pid(+) = t2.Pid
同时发现:外连接的时候(+)有些情况下 比left join 效率高些