- 最后登录
- 2016-11-23
- 在线时间
- 34 小时
- 威望
- 11
- 金钱
- 258
- 注册时间
- 2012-7-17
- 阅读权限
- 10
- 帖子
- 64
- 精华
- 0
- 积分
- 11
- UID
- 620
|
1#
发表于 2013-7-11 21:20:08
|
查看: 3270 |
回复: 6
本帖最后由 wengtf 于 2013-7-11 21:46 编辑
Env:11.1.0.7 rac on linux 64bit
业务系统需要在早上7点半跑一个批(存储过程),但是现在生产环境和测试环境执行计划中,prod比testing Fatch数据的时间长400秒,目前排除了网络问题。附件是7月11日上午的statspack 和2个前2天 每个节点的awr,有劳。
##AWR报告中SQL * Net more data from dblink 等待事件较多。
生产环境
*****************************************************************- SQL ID: 8c21hbhf1t608
- Plan Hash: 384927267
- SELECT A.M2PNO, A.INS_CODE SOURCELIB, A.M2PCO, B.ACPLAN,
- SUM(DECODE(TRIM(M2TCOD),'TUC',A.M2AMTF,'TUP',A.M2AMTF,'LSC',A.M2AMTF,'LSP',
- A.M2AMTF,'CNL',-1*A.M2AMTF)) AMT652
- FROM
- RLS_LFPUFTDH@BFR A, (SELECT ACPNO,MAX(ACPLAN) ACPLAN FROM RLS_TEMP_LFPACT
- WHERE ACTCD IN ('Z1', 'Z2', 'Z3', 'Z4') AND ACDOT = :B1 GROUP BY ACPNO) B
- WHERE A.M2TCOD IN ('CNL','TUC','TUP','LSC','LSP') AND A.M2PNO = B.ACPNO
- GROUP BY A.M2PNO, A.INS_CODE, A.M2PCO, B.ACPLAN
- call count cpu elapsed disk query current rows
- ------- ------ -------- ---------- ---------- ---------- ---------- ----------
- Parse 1 0.00 0.00 0 0 0 0
- Execute 1 0.00 0.02 0 1 0 0
- Fetch 53 0.24 502.94 0 27 0 52
- ------- ------ -------- ---------- ---------- ---------- ---------- ----------
- total 55 0.25 502.96 0 28 0 52
- Misses in library cache during parse: 1
- Misses in library cache during execute: 1
- Optimizer mode: ALL_ROWS
- Parsing user id: 82 (recursive depth: 1)
- Rows Row Source Operation
- ------- ---------------------------------------------------
- 52 HASH GROUP BY (cr=27 pr=0 pw=0 time=0 us cost=11268 size=2432 card=38)
- 57 HASH JOIN (cr=27 pr=0 pw=0 time=0 us cost=11267 size=60416 card=944)
- 159 VIEW (cr=27 pr=0 pw=0 time=0 us cost=10 size=2703 card=159)
- 159 HASH GROUP BY (cr=27 pr=0 pw=0 time=0 us cost=10 size=5406 card=159)
- 159 TABLE ACCESS FULL RLS_TEMP_LFPACT (cr=27 pr=0 pw=0 time=0 us cost=9 size=5406 card=159)
- 138372 REMOTE RLS_LFPUFTDH (cr=0 pr=0 pw=0 time=10377402 us cost=11251 size=36344207 card=773281)
- ********************************************************************************
复制代码 测试环境:- ********************************************************************************
- SQL ID: 8c21hbhf1t608
- Plan Hash: 384927267
- SELECT A.M2PNO, A.INS_CODE SOURCELIB, A.M2PCO, B.ACPLAN,
- SUM(DECODE(TRIM(M2TCOD),'TUC',A.M2AMTF,'TUP',A.M2AMTF,'LSC',A.M2AMTF,'LSP',
- A.M2AMTF,'CNL',-1*A.M2AMTF)) AMT652
- FROM
- RLS_LFPUFTDH@BFR A, (SELECT ACPNO,MAX(ACPLAN) ACPLAN FROM RLS_TEMP_LFPACT
- WHERE ACTCD IN ('Z1', 'Z2', 'Z3', 'Z4') AND ACDOT = :B1 GROUP BY ACPNO) B
- WHERE A.M2TCOD IN ('CNL','TUC','TUP','LSC','LSP') AND A.M2PNO = B.ACPNO
- GROUP BY A.M2PNO, A.INS_CODE, A.M2PCO, B.ACPLAN
- call count cpu elapsed disk query current rows
- ------- ------ -------- ---------- ---------- ---------- ---------- ----------
- Parse 1 0.00 0.00 0 0 0 0
- Execute 1 0.00 0.00 0 1 0 0
- Fetch 53 0.25 119.88 0 27 0 52
- ------- ------ -------- ---------- ---------- ---------- ---------- ----------
- total 55 0.26 119.88 0 28 0 52
- Misses in library cache during parse: 1
- Misses in library cache during execute: 1
- Optimizer mode: ALL_ROWS
- Parsing user id: 134 (recursive depth: 1)
- Rows Row Source Operation
- ------- ---------------------------------------------------
- 52 HASH GROUP BY (cr=27 pr=0 pw=0 time=0 us cost=11268 size=2432 card=38)
- 57 HASH JOIN (cr=27 pr=0 pw=0 time=0 us cost=11267 size=60416 card=944)
- 159 VIEW (cr=27 pr=0 pw=0 time=0 us cost=10 size=2703 card=159)
- 159 HASH GROUP BY (cr=27 pr=0 pw=0 time=0 us cost=10 size=5406 card=159)
- 159 TABLE ACCESS FULL RLS_TEMP_LFPACT (cr=27 pr=0 pw=0 time=0 us cost=9 size=5406 card=159)
- 138372 REMOTE RLS_LFPUFTDH (cr=0 pr=0 pw=0 time=125985 us cost=11251 size=36344207 card=773281)
- ********************************************************************************
复制代码 |
|