oracle优化:instr做join条件很慢

情况描述

oracle优化:instr做join条件很慢_第1张图片

sql语句

   select sqdbh,sqr,bm,sqrq,skdwbm,skdwmc,sqfkje ,'N' as xz_flag  ,sjfkrq,fkdwkhyh
   from (select * from yw_fksqd where  to_char(sqrq,'yyyy/mm') >= '2018/12' and state in ('付款' , '已审核' , '批准', 'pz'))
   INNER JOIN (select d_no from rs_department where zt_no = :as_zt and tt_no in ('29','32','34','37')) on bm = d_no
   left join  (select fksqh from CW_ZNHS_RK where zt_no = :as_zt )  on instr(fksqh,sqdbh) > 0 
   where fksqh is null 

如何优化?

你可能感兴趣的:(oracle,oracle)