各位大侠,帮我看看这个该怎么处理:
在10.2.0.1版本下运算速度不错,但在10.2.0.4的版本中速度慢近二十多倍,请问是什么缘故?如何处理?
select distinct(patient_id)
from
(select patient_id,visit_id,item_code,item_spec,sum(amount)
from inp_bill_detail
where ITEM_CLASS ='A' and substr(ITEM_CODE,1,2) in (:ls_drug_master)
and ordered_by in (select dept_code from inq_dept_dict
where hospital_part_code like :hos_name )
and patient_id in (select patient_id from v_bedpats_in_hospital
where dept_code is not null
and stat_DATE_TIME >=trunc(:ld_fr_date)
and stat_DATE_TIME =:ld_fr_date and BILLING_DATE_TIME0) aaa
结果:
10.2.0.4
10.2.0.4.png (67.84 KB, 下载次数: 4)
下载附件
2013-10-26 20:57 上传
10.2.0.1
10.2.0.1.PNG (77.86 KB, 下载次数: 3)
下载附件
2013-10-26 20:57 上传
|