- 最后登录
- 2014-7-7
- 在线时间
- 65 小时
- 威望
- 23
- 金钱
- 172
- 注册时间
- 2012-5-15
- 阅读权限
- 10
- 帖子
- 36
- 精华
- 1
- 积分
- 23
- UID
- 430
|
1#
发表于 2013-4-18 10:48:24
|
查看: 4022 |
回复: 5
本帖最后由 vincent 于 2013-4-18 10:51 编辑
- select a.patient_name as "Bill#PatientName",
- a.patient_sex,
- a.PATIENT_ID "Bill#PatientId",
- a.HOSPITAL_ID as "Bill#HospitalID",
- a.HOSPITAL_NAME as "Bill#HospitalName",
- a.ADMISSION_DATE as "Bill#AdmissonDate",
- a.BILLDATE as "Bill#BillDate",
- a.bill_no as "Bill#BillCode",
- a.ADMISSION_DISEASE_NAME as "Bill#AdmissionDiseaseName",
- a.DISCHARGE_DISEASE_NAME as "Bill#DischargeDiseaseName",
- b.ELIGIBLE_AMOUNT,
- b.Hospital_Remark,
- b.ITEM_DATE,
- b.ITEM_ID,
- b.ITEM_NAME,
- b.NUMBERS,
- b.PRICE,
- b.COSTS,
- b.DRUG_SPEC,
- b.PACKAGE_UNIT,
- b.physician_name,
- b.deptname,
- b.REJECT_MONEY,
- b.REJECT_RESON,
- b.OPER_USER_NAME,
- b.OPER_DATE,
- c.rules as "CheckRule#RuleName",
- c.reason as "AuditResult#Reason"
- from DW_BillDetail b
- inner join DW_Bill a
- on b.pid = a.hisid
- inner join (select aa.detail_id,
- wm_concat(aa.reason) reason,
- wm_concat(bb.rule_name) rules
- from ad_auditresult aa
- inner join gz_list bb
- on aa.rule_code = bb.id
- inner join dw_bill cc
- on aa.claim_id = cc.id
- where aa.detail_id <> '0'
- and cc.TABLE_PAR >= '20130101'
- and cc.TABLE_PAR < '20130418'
- and cc.ANDIT_MANU_STATUS in ('0', '1', '2', '9')
- and cc.HOSPITAL_ID = '1002'
- group by aa.detail_id) c
- on b.id = c.detail_id
- where b.REJECT_MONEY > 0
- order by b.pid, b.ITEM_DATE
复制代码 执行计划- Plan hash value: 3559754870
-
- -----------------------------------------------------------------------------------------------------------------------------------------
- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
- -----------------------------------------------------------------------------------------------------------------------------------------
- | 0 | SELECT STATEMENT | | 1 | 4274 | 41253 (1)| 00:08:16 | | |
- | 1 | SORT ORDER BY | | 1 | 4274 | 41253 (1)| 00:08:16 | | |
- | 2 | NESTED LOOPS | | 1 | 4274 | 41252 (1)| 00:08:16 | | |
- | 3 | NESTED LOOPS | | 1 | 4168 | 41249 (1)| 00:08:15 | | |
- | 4 | VIEW | | 1 | 4024 | 41247 (1)| 00:08:15 | | |
- | 5 | SORT GROUP BY | | 1 | 148 | 41247 (1)| 00:08:15 | | |
- |* 6 | HASH JOIN | | 835 | 120K| 41246 (1)| 00:08:15 | | |
- | 7 | TABLE ACCESS FULL | GZ_LIST | 39 | 780 | 2 (0)| 00:00:01 | | |
- | 8 | NESTED LOOPS | | | | | | | |
- | 9 | NESTED LOOPS | | 835 | 104K| 41244 (1)| 00:08:15 | | |
- |* 10 | TABLE ACCESS BY GLOBAL INDEX ROWID| DW_BILL | 223 | 9589 | 40409 (1)| 00:08:05 | ROWID | ROWID |
- |* 11 | INDEX RANGE SCAN | IX_BILL_HOSPITAL_ID | 71601 | | 204 (1)| 00:00:03 | | |
- |* 12 | INDEX RANGE SCAN | IX_AD_AUDITRESULT_CLAIM_ID | 4 | | 3 (0)| 00:00:01 | | |
- |* 13 | TABLE ACCESS BY INDEX ROWID | AD_AUDITRESULT | 4 | 340 | 5 (0)| 00:00:01 | | |
- |* 14 | TABLE ACCESS BY INDEX ROWID | DW_BILLDETAIL | 1 | 144 | 3 (0)| 00:00:01 | | |
- |* 15 | INDEX UNIQUE SCAN | PK_DW_BILLDETAIL | 1 | | 2 (0)| 00:00:01 | | |
- | 16 | TABLE ACCESS BY GLOBAL INDEX ROWID | DW_BILL | 1 | 106 | 3 (0)| 00:00:01 | ROWID | ROWID |
- |* 17 | INDEX UNIQUE SCAN | PK_DW_BILL | 1 | | 2 (0)| 00:00:01 | | |
- -----------------------------------------------------------------------------------------------------------------------------------------
-
- Predicate Information (identified by operation id):
- ---------------------------------------------------
-
- 6 - access("BB"."ID"=TO_NUMBER("AA"."RULE_CODE"))
- 10 - filter("CC"."TABLE_PAR">='20130101' AND ("CC"."ANDIT_MANU_STATUS"='0' OR "CC"."ANDIT_MANU_STATUS"='1' OR
- "CC"."ANDIT_MANU_STATUS"='2' OR "CC"."ANDIT_MANU_STATUS"='9') AND "CC"."TABLE_PAR"<'20130418')
- 11 - access("CC"."HOSPITAL_ID"='1002')
- 12 - access("AA"."CLAIM_ID"="CC"."ID")
- 13 - filter("AA"."DETAIL_ID"<>'0')
- 14 - filter("B"."REJECT_MONEY">0)
- 15 - access("B"."ID"="C"."DETAIL_ID")
- 17 - access("B"."PID"="A"."HISID")
复制代码 GZ_LIST表共39条信息没有建立索引 |
|