- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
3#
发表于 2012-5-7 19:52:48
ODM DATA:
Linux x86 64-bit 11.1.0.7.0 RAC=yes
Redo size: 18,421,504.8 507,954.2 redo 17MB/s
Hard parses: 39.6 每秒硬解析 39次
Transactions: 36.3 每秒事务 36个
Elapsed: 60.32 (mins)
DB Time: 777.45 (mins)
db time / elapsed = 12 负载较高
ORA-01555 caused by SQL statement below (SQL ID: ftpjxbvnurggw, Query Duration=1805 sec, SCN: 0x0000.a394673e):
merge into t_mo_temp moTemp using (select DISTINCT p1.moentityname as p1_moentityname, p1.moentityid as p1_moentityid, p0.t0_moentityid as p2_moentityid from (select t0.motypeid as t0_motypeid, t0.moentityid as t0_moentityid, t0.abovemotypeid as t0_abovemotypeid, t0.abovemoentityid as t0_abovemoentityid from pm4h_sum.v_mo_entity_relation t0 where t0.motypeid = '982c8e3f-bf32-4828-86e8-0baf1dac8d08' and t0.abovemotypeid = 'ccfc8c6e-f3e6-4836-a7a1-757bbaa0e02f') p0 left join pm4h_sum.v_mo_entity p1 on p1.moentityid = p0.t0_abovemoentityid ) moEnity on (moTemp.id0 = moEnity.p2_moentityid) when matched then update set moTemp.id1 = moEnity.p1_moentityid, moTemp.name1 = moEnity.p1_moentityname
Tue Apr 24 09:55:48 2012
Thread 2 advanced to log sequence 71782 (LGWR switch)
Current log# 17 seq# 71782 mem# 0: +DG_DATA/mosmir/onlinelog/redo17.log
Tue Apr 24 09:57:17 2012
ORA-01555 caused by SQL statement below (SQL ID: ftpjxbvnurggw, Query Duration=3536 sec, SCN: 0x0000.a338c56c):
merge into t_mo_temp moTemp using (select DISTINCT p1.moentityname as p1_moentityname, p1.moentityid as p1_moentityid, p0.t0_moentityid as p2_moentityid from (select t0.motypeid as t0_motypeid, t0.moentityid as t0_moentityid, t0.abovemotypeid as t0_abovemotypeid, t0.abovemoentityid as t0_abovemoentityid from pm4h_sum.v_mo_entity_relation t0 where t0.motypeid = '982c8e3f-bf32-4828-86e8-0baf1dac8d08' and t0.abovemotypeid = 'ccfc8c6e-f3e6-4836-a7a1-757bbaa0e02f') p0 left join pm4h_sum.v_mo_entity p1 on p1.moentityid = p0.t0_abovemoentityid ) moEnity on (moTemp.id0 = moEnity.p2_moentityid) when matched then update set moTemp.id1 = moEnity.p1_moentityid, moTemp.name1 = moEnity.p1_moentityname
ORA-01555 caused by SQL statement below (SQL ID: 71qbcdwgg9kqt, Query Duration=4002 sec, SCN: 0x0000.a7318812):
merge into INDICATOR_12761 m using ( select tt2.moentityid,startday,starttime,6000 period, nvl(INDICATOR_9575_5,0)+nvl(INDICATOR_9581_1,0)+nvl(INDICATOR_9581_2,0)+nvl(INDICATOR_9591_10,0)+nvl(INDICATOR_9589_10,0) as INDICATOR_12761_44,nvl(INDICATOR_9576_1,0) as INDICATOR_12761_34,nvl(INDICATOR_9592_1,0)+nvl(INDICATOR_9592_3,0)+nvl(INDICATOR_9592_2,0)+nvl(INDICATOR_9592_5,0)+nvl(INDICATOR_9592_11,0)+nvl(INDICATOR_9592_7,0)+nvl(INDICATOR_9592_9,0)+nvl(INDICATOR_9592_4,0)+nvl(INDICATOR_9592_8,0)+nvl(INDICATOR_9592_12,0)+nvl(INDICAT
merge into INDICATOR_12761 m using ( select tt2.moentityid,startday,starttime,6000 period, nvl(INDICATOR_9575_5,0)+nvl(INDICATOR_9581_1,0)+nvl(INDICATOR_9581_2,0)+nvl(INDICATOR_9591_10,0)+nvl(INDICATOR_9589_10,0) as INDICATOR_12761_44,nvl(INDICATOR_9576_1,0) as INDICATOR_12761_34,nvl(INDICATOR_9592_1,0)+nvl(INDICATOR_9592_3,0)+nvl(INDICATOR_9592_2,0)+nvl(INDICATOR_9592_5,0)+nvl(INDICATOR_9592_11,0)+nvl(INDICATOR_9592_7,0)+nvl(INDICATOR_9592_9,0)+nvl(INDICATOR_9592_4,0)+nvl(INDICATOR_9592_8,0)+nvl(INDICATOR_9592_1
引起 ORA-01555的主要是 merge into using (select ...) 的语句
AWR中的undo信息 ,并发事务Max Tx Concy 较高
Undo Segment Summary
Min/Max TR (mins) - Min and Max Tuned Retention (minutes)
STO - Snapshot Too Old count, OOS - Out of Space count
Undo segment block stats:
uS - unexpired Stolen, uR - unexpired Released, uU - unexpired reUsed
eS - expired Stolen, eR - expired Released, eU - expired reUsed
Undo TS# Num Undo Blocks (K) Number of Transactions Max Qry Len (s) Max Tx Concurcy Min/Max TR (mins) STO/ OOS uS/uR/uU/ eS/eR/eU
4 7,309.49 2,772,725 1,281 33 26.7/41.4 0/0 0/0/0/0/0/0
Back to Undo Statistics
Back to Top
Undo Segment Stats
Most recent 35 Undostat rows, ordered by Time desc
End Time Num Undo Blocks Number of Transactions Max Qry Len (s) Max Tx Concy Tun Ret (mins) STO/ OOS uS/uR/uU/ eS/eR/eU
07-May 07:51 1,935,982 778,280 382 26 34 0/0 0/0/0/0/0/0
07-May 07:41 1,413,824 618,534 865 33 33 0/0 0/0/0/0/0/0
07-May 07:31 1,483,901 634,973 781 31 41 0/0 0/0/0/0/0/0
07-May 07:21 397,271 186,290 1,281 30 32 0/0 0/0/0/0/0/0
07-May 07:11 370,075 16,748 679 13 35 0/0 0/0/0/0/0/0
07-May 07:01 1,708,433 537,900 878 28 27 0/0 0/0/0/0/0/0
在07-May-12 07:00:08 到 07-May-12 08:00:27 没有发生 expired Stolen unexpired Stolen
10g 中默认启用 undo auto tune 所以在undo 表空间够大的情况下 undo_retention 自动调优会比 实际的 undo_retention(默认900) 参数要大得多,
在 AWR中可以看到 Tun Ret (mins)约为 30分钟= 1800s, 这说明系统对undo的 需求非常大
1. 建议 调优merge 语句相关的select 查询 ,减少查询时间 避免出现ORA-01555
另一个 非常值得关注的是 问题是:
table fetch continued row 13,826,364 3,820.20 105.34
每秒 table fetch continued row 达到 3820次 说明 系统中存在大量的chained row, 这可能是 造成查询时间过长的直接原因 之一 , 建议你找出chained rows相关的表
2.
执行以下脚本 并贴出输出 ,找出合适的undo 表空间大小 |
|