- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2014-11-5 10:21:36
我对比2个文件 看到最大的差别是 这2语句:
SELECT NVL(SUM(C.DELY_QTY), 0)
FROM
( SELECT T.DELY_GB,T.AREA_LGROUP,T.AREA_MGROUP,T.AREA_SGROUP FROM
TADMINDELIVERYQTY T, TDELYAREA B WHERE T.AREA_LGROUP = B.AREA_LGROUP AND
(T.AREA_MGROUP = '999' OR (T.AREA_MGROUP = B.AREA_MGROUP AND (T.AREA_SGROUP
= '999' OR T.AREA_SGROUP = B.AREA_SGROUP) ) ) AND B.USE_YN = '1' AND
T.YYMMDD = :B5 AND B.AREA_LGROUP = :B4 AND B.AREA_MGROUP = :B3 AND
B.AREA_SGROUP = :B2 AND ( ( :B1 <> '00' AND T.DELY_GB = :B1 ) OR ( (:B1 =
'00') AND T.DELY_GB IN ( SELECT C.DELY_GB FROM VITEM B, TDELYCOMPANYD C,
TITEMTAGINFO TI WHERE C.AREA_LGROUP = :B4 AND C.AREA_MGROUP = :B3 AND
C.AREA_SGROUP = :B2 AND TI.ITEM_CODE = B.ITEM_CODE AND C.ITEM_DELY_GB =
NVL(TI.TAG7_YN,'1') AND B.ITEM_CODE = :B8 AND C.C_CODE = :B7 AND
C.WH_DELY_CODE = DECODE(B.TAG5_YN,'0',:B6 ,'3',:B6 ,'5',:B6 ,'4',:B6 ,'991')
AND C.ORDER_TYPE = '1' UNION SELECT C.SEND_DELY_GB FROM VITEM B,
TDELYCOMPANY C, TITEMTAGINFO TI WHERE C.AREA_LGROUP = :B4 AND C.AREA_MGROUP
= :B3 AND C.AREA_SGROUP = :B2 AND TI.ITEM_CODE = B.ITEM_CODE AND
C.ITEM_DELY_GB = NVL(TI.TAG7_YN,'1') AND B.ITEM_CODE = :B8 AND C.C_CODE =
:B7 AND C.WH_DELY_CODE = DECODE(B.TAG5_YN,'0',:B6 ,'3',:B6 ,'5',:B6 ,'4',
:B6 ,'991') ) ) ) ) A, TDELYAREA B, TORDERDELYDAY C WHERE A.AREA_LGROUP =
B.AREA_LGROUP AND (A.AREA_MGROUP = '999' OR (A.AREA_MGROUP = B.AREA_MGROUP
AND (A.AREA_SGROUP = '999' OR A.AREA_SGROUP = B.AREA_SGROUP) ) ) AND
B.USE_YN = '1' AND C.DELY_HOPE_DATE = :B5 AND C.DELY_HOPE_YN = '1' AND
C.AREA_LGROUP = B.AREA_LGROUP AND C.AREA_MGROUP = B.AREA_MGROUP AND
C.AREA_SGROUP = B.AREA_SGROUP AND C.DELY_GB = A.DELY_GB
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 18 0.01 0.02 0 0 0 0
Fetch 18 2.14 3.35 0 131727 0 18
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 36 2.15 3.37 0 131727 0 18
SELECT NVL(SUM(C.DELY_QTY), 0)
FROM
( SELECT T.DELY_GB,T.AREA_LGROUP,T.AREA_MGROUP,T.AREA_SGROUP FROM
TADMINDELIVERYQTY T, TDELYAREA B WHERE T.AREA_LGROUP = B.AREA_LGROUP AND
(T.AREA_MGROUP = '999' OR (T.AREA_MGROUP = B.AREA_MGROUP AND (T.AREA_SGROUP
= '999' OR T.AREA_SGROUP = B.AREA_SGROUP) ) ) AND B.USE_YN = '1' AND
T.YYMMDD = :B5 AND B.AREA_LGROUP = :B4 AND B.AREA_MGROUP = :B3 AND
B.AREA_SGROUP = :B2 AND ( ( :B1 <> '00' AND T.DELY_GB = :B1 ) OR ( (:B1 =
'00') AND T.DELY_GB IN ( SELECT C.DELY_GB FROM VITEM B, TDELYCOMPANYD C,
TITEMTAGINFO TI WHERE C.AREA_LGROUP = :B4 AND C.AREA_MGROUP = :B3 AND
C.AREA_SGROUP = :B2 AND TI.ITEM_CODE = B.ITEM_CODE AND C.ITEM_DELY_GB =
NVL(TI.TAG7_YN,'1') AND B.ITEM_CODE = :B8 AND C.C_CODE = :B7 AND
C.WH_DELY_CODE = DECODE(B.TAG5_YN,'0',:B6 ,'3',:B6 ,'5',:B6 ,'4',:B6 ,'991')
AND C.ORDER_TYPE = '1' UNION SELECT C.SEND_DELY_GB FROM VITEM B,
TDELYCOMPANY C, TITEMTAGINFO TI WHERE C.AREA_LGROUP = :B4 AND C.AREA_MGROUP
= :B3 AND C.AREA_SGROUP = :B2 AND TI.ITEM_CODE = B.ITEM_CODE AND
C.ITEM_DELY_GB = NVL(TI.TAG7_YN,'1') AND B.ITEM_CODE = :B8 AND C.C_CODE =
:B7 AND C.WH_DELY_CODE = DECODE(B.TAG5_YN,'0',:B6 ,'3',:B6 ,'5',:B6 ,'4',
:B6 ,'991') ) ) ) ) A, TDELYAREA B, TORDERDELYDAY C WHERE A.AREA_LGROUP =
B.AREA_LGROUP AND (A.AREA_MGROUP = '999' OR (A.AREA_MGROUP = B.AREA_MGROUP
AND (A.AREA_SGROUP = '999' OR A.AREA_SGROUP = B.AREA_SGROUP) ) ) AND
B.USE_YN = '1' AND C.DELY_HOPE_DATE = :B5 AND C.DELY_HOPE_YN = '1' AND
C.AREA_LGROUP = B.AREA_LGROUP AND C.AREA_MGROUP = B.AREA_MGROUP AND
C.AREA_SGROUP = B.AREA_SGROUP AND C.DELY_GB = A.DELY_GB
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 12 0.01 0.01 0 0 0 0
Fetch 12 0.03 0.10 0 12397 0 12
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 24 0.04 0.11 0 12397 0 12
131727 /18 vs 12397 /12 |
|