SQL性能优化策略之索引优化方法
复制SQL> selectsum(cggzl) cggzl, sum(qbgzl) qbgzl
from (selectcase
when zlxm_mc like%2ê3?3£1??ì2é%then
gzl
else
0
end cggzl,
case
when zlxm_mc like%?3±í?÷1ù%then
gzl
else
0
end qbgzl
from dictmanage.dict_zl_pro b,
his.pat_inpat_order_info c,
pat_inpat_order_cost d
where d.sfxm_id = b.zlxm_id
and c.yzjl_id = d.dyzy_yzjl_id
and zlxm_mc like%2???%
and c.yz_zxrq >= to_date(sysdate)
and c.yz_zxrq < to_date(sysdate + 1)
and d.fy_status in (1, 2)
and sfxm_je > 0
and c.yz_zfrq isnull
and c.zylsh = :in_zylsh)
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.
THE END