AWR 是通过对比两次快照(snapshot)收集到的统计信息,来生成报表数据,生成的报表包括多个部分。
1 数据库基本信息
DB Name |
DB Id |
Instance |
Inst num |
Release |
RAC |
Host |
ICCI |
1314098396 |
ICCI1 |
1 |
10.2.0.3.0 |
YES |
HPGICCI1
|
2 两次snapshot的基本信息
Snap Id |
Snap Time |
Sessions |
Cursors/Session |
|
Begin Snap: |
2678 |
25-Dec-08 14:04:50 |
24 |
1.5 |
End Snap: |
2680 |
25-Dec-08 15:23:37 |
26 |
1.5 |
Elapsed: |
78.79 (mins) |
|||
DB Time: |
11.05 (mins) |
DB时间包括cpu在数据处理和等待(非空闲等待)所花的时间。对于批量系统,数据库的工作负载总是集中在一段时间内。如果快照周期不在这一段时间内,或者快照周期跨度太长而包含了大量的数据库空闲时间,所得出的分析结果是没有意义的.这也说明选择分析时间段很关键,要选择能够代表性能问题的时间段。
3 Cache信息
|
Begin |
End |
|
|
Buffer Cache: |
3,344M |
3,344M |
Std Block Size: |
8K |
Shared Pool Size: |
704M |
704M |
Log Buffer: |
14,352 |
4 平时最关注的是SQL ordered by Elapsed Time
Elapsed Time (s) |
CPU Time (s) |
Executions |
Elap per Exec (s) |
% Total DB Time |
SQL Id |
SQL Module |
SQL Text |
93 |
57 |
1 |
93.50 |
14.10 |
cuidmain@HPGICCI1 (TNS V1-V3) |
insert into CUID select CUID_... |
|
76 |
75 |
172,329 |
0.00 |
11.52 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into ICCICCS values (:... |
|
58 |
42 |
1 |
58.04 |
8.75 |
cumimain@HPGICCI1 (TNS V1-V3) |
insert into CUMI select CUSV_... |
|
51 |
42 |
1 |
50.93 |
7.68 |
cusmmain@HPGICCI1 (TNS V1-V3) |
insert into CUSM select CUSM_... |
|
38 |
36 |
166,069 |
0.00 |
5.67 |
select c.name, u.name from co... |
||
35 |
3 |
1 |
35.00 |
5.28 |
SQL*Plus |
SELECT F.TABLESPACE_NAME, TO_... |
|
23 |
23 |
172,329 |
0.00 |
3.46 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
insert into iccifnsact values... |
|
15 |
11 |
5 |
2.98 |
2.25 |
DECLARE job BINARY_INTEGER := ... |
||
14 |
14 |
172,983 |
0.00 |
2.16 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
update ICCIFNSACT set BORM_AD... |
|
13 |
13 |
172,337 |
0.00 |
2.00 |
load_oldnewact@HPGICCI1 (TNS V1-V3) |
insert into OLDNEWACT values ... |
|
13 |
13 |
166,051 |
0.00 |
1.89 |
icci_migact@HPGICCI1 (TNS V1-V3) |
insert into ICCICCS values (:... |
|
10 |
4 |
1 |
9.70 |
1.46 |
cuidmain@HPGICCI1 (TNS V1-V3) |
select CUID_CUST_NO , CUID_ID_... |
|
10 |
8 |
5 |
1.91 |
1.44 |
INSERT INTO STATS$SGA_TARGET_A... |
||
8 |
8 |
172,329 |
0.00 |
1.25 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
update ICCICCS set CCSMAXOVER... |
|
8 |
8 |
172,983 |
0.00 |
1.16 |
load_fnsact@HPGICCI1 (TNS V1-V3) |
select * from ICCIPRODCODE wh... |
5 Complete List of SQL Text
这里面包含的是4当中SQL Id所对应的具体code。
SQL Id |
SQL Text |
04xtrk7uyhknh |
select obj#, type#, ctime, mtime, stime, status, dataobj#, flags, oid$, spare1, spare2 from obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname is null and subname is null |
0hhmdwwgxbw0r |
select obj#, type#, flags, related, bo, purgeobj, con# from RecycleBin$ where ts#=:1 and to_number(bitand(flags, 16)) = 16 order by dropscn |
0k8h617b8guhf |
delete from RecycleBin$ where purgeobj=:1 |
0pvtkmrrq8usg |
select file#, block# from seg$ where type# = 3 and ts# = :1 |
0v9t4qb1zb2b |
select CUID_CUST_NO , CUID_ID_TYPE , CUID_ID_RECNO from CUID_TMP where CHGFLAG='D' |
104pd9mm3fh9p |
select blocks, maxblocks, grantor#, priv1, priv2, priv3 from tsq$ where ts#=:1 and user#=:2 |
1crajpb7j5tyz |
INSERT INTO STATS$SGA_TARGET_ADVICE ( SNAP_ID , DBID , INSTANCE_NUMBER , SGA_SIZE , SGA_SIZE_FACTOR , ESTD_DB_TIME , ESTD_DB_TIME_FACTOR , ESTD_PHYSICAL_READS ) SELECT :B3 , :B2 , :B1 , SGA_SIZE , SGA_SIZE_FACTOR , ESTD_DB_TIME , ESTD_DB_TIME_FACTOR , ESTD_PHYSICAL_READS FROM V$SGA_TARGET_ADVICE |
1dm3bq36vu3g8 |
insert into iccifnsact values (:b0, :b1, :b2, null , null , :b3, :b4, GREATEST(:b5, :b6), null , :b7, :b8, null , :b9, :b10, :b6, null , null , null , null , null , :b12, null , null , null , :b13, :b14, null , null , :b15, :b16, :b17) |
1gu8t96d0bdmu |
select t.ts#, t.file#, t.block#, nvl(t.bobj#, 0), nvl(t.tab#, 0), t.intcols, nvl(t.clucols, 0), t.audit$, t.flags, t.pctfree$, t.pctused$, t.initrans, t.maxtrans, t.rowcnt, t.blkcnt, t.empcnt, t.avgspc, t.chncnt, t.avgrln, t.analyzetime, t.samplesize, t.cols, t.property, nvl(t.degree, 1), nvl(t.instances, 1), t.avgspc_flb, t.flbcnt, t.kernelcols, nvl(t.trigflag, 0), nvl(t.spare1, 0), nvl(t.spare2, 0), t.spare4, t.spare6, ts.cachedblk, ts.cachehit, ts.logicalread from tab$ t, tab_stats$ ts where t.obj#= :1 and t.obj# = ts.obj# (+) |
1uk5m5qbzj1vt |
BEGIN dbms_workload_repository.create_snapshot; END; |
2ym6hhaq30r73 |
select type#, blocks, extents, minexts, maxexts, extsize, extpct, user#, iniexts, NVL(lists, 65535), NVL(groups, 65535), cachehint, hwmincr, NVL(spare1, 0), NVL(scanhint, 0) from seg$ where ts#=:1 and file#=:2 and block#=:3 |
350f5yrnnmshs |
lock table sys.mon_mods$ in exclusive mode nowait |
38apjgr0p55ns |
update ICCICCS set CCSMAXOVERDUE=GREATEST(:b0, CCSMAXOVERDUE) where FNSACTNO=:b1 |
38gak8u2qm11w |
select count(*) from CUSVAA_TMP |
3m8smr0v7v1m6 |
INSERT INTO sys.wri$_adv_message_groups (task_id, id, seq, message#, fac, hdr, lm, nl, p1, p2, p3, p4, p5) VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13) |
44au3v5mzpc1c |
insert into ICCICURMMAST values (:b0, :b1, :b2) |
49ms69srnaxzj |
insert into ICCIRPYV values (:b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8, :b9, :b10, :b11, :b12, :b13, :b14, :b15, :b16, :b17, :b18, :b19, :b20, :b21, :b22, :b23, :b24, :b25, :b26, :b27, :b28, :b29, :b30, :b31, :b32, :b33, :b34, :b35, :b36, :b37, :b38, :b39, :b40, :b41, :b42, :b43, :b44, :b45, :b46, :b47, :b48, :b49, :b50, :b51) |
4vja2k2gdtyup |
insert into ICCICCS values (:b0, '////////////////////////', 0, 0, 0, 0, 0, ' ', 0, 0, 0, ' ', '0', null ) |
501v412s13r4m |
update ICCIFNSACT set BORM_FACILITY_NO=:b0 where BORM_MEMB_CUST_AC=:b1 |
53saa2zkr6wc3 |
select intcol#, nvl(pos#, 0), col#, nvl(spare1, 0) from ccol$ where con#=:1 |
569r5k05drsj7 |
insert into CUMI select CUSV_CUST_NO , CUSV_EDUCATION_CODE , CHGDATE from CUMI_TMP where CHGFLAG<>'D' |
5c4qu2zmj3gux |
select * from ICCIPRODCODE where PRODCODE=to_char(:b0) |
5ngzsfstg8tmy |
select o.owner#, o.name, o.namespace, o.remoteowner, o.linkname, o.subname, o.dataobj#, o.flags from obj$ o where o.obj#=:1 |
6769wyy3yf66f |
select pos#, intcol#, col#, spare1, bo#, spare2 from icol$ where obj#=:1 |
6z06gcfw39pkd |
SELECT F.TABLESPACE_NAME, TO_CHAR ((T.TOTAL_SPACE - F.FREE_SPACE), '999, 999') "USED (MB)", TO_CHAR (F.FREE_SPACE, '999, 999') "FREE (MB)", TO_CHAR (T.TOTAL_SPACE, '999, 999') "TOTAL (MB)", TO_CHAR ((ROUND ((F.FREE_SPACE/T.TOTAL_SPACE)*100)), '999')||' %' PER_FREE FROM ( SELECT TABLESPACE_NAME, ROUND (SUM (BLOCKS*(SELECT VALUE/1024 FROM V$PARAMETER WHERE NAME = 'db_block_size')/1024) ) FREE_SPACE FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME ) F, ( SELECT TABLESPACE_NAME, ROUND (SUM (BYTES/1048576)) TOTAL_SPACE FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME ) T WHERE F.TABLESPACE_NAME = T.TABLESPACE_NAME |
78m9ryygp65v5 |
SELECT /*+ ALL_ROWS */ COUNT(*) FROM ALL_POLICIES V WHERE V.OBJECT_OWNER = :B3 AND V.OBJECT_NAME = :B2 AND (POLICY_NAME LIKE '%xdbrls%' OR POLICY_NAME LIKE '%$xd_%') AND V.FUNCTION = :B1 |
7gtztzv329wg0 |
select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and cd.enabled = :1 and c.owner# = u.user# |
7ng34ruy5awxq |
select i.obj#, i.ts#, i.file#, i.block#, i.intcols, i.type#, i.flags, i.property, i.pctfree$, i.initrans, i.maxtrans, i.blevel, i.leafcnt, i.distkey, i.lblkkey, i.dblkkey, i.clufac, i.cols, i.analyzetime, i.samplesize, i.dataobj#, nvl(i.degree, 1), nvl(i.instances, 1), i.rowcnt, mod(i.pctthres$, 256), i.indmethod#, i.trunccnt, nvl(c.unicols, 0), nvl(c.deferrable#+c.valid#, 0), nvl(i.spare1, i.intcols), i.spare4, i.spare2, i.spare6, decode(i.pctthres$, null, null, mod(trunc(i.pctthres$/256), 256)), ist.cachedblk, ist.cachehit, ist.logicalread from ind$ i, ind_stats$ ist, (select enabled, min(cols) unicols, min(to_number(bitand(defer, 1))) deferrable#, min(to_number(bitand(defer, 4))) valid# from cdef$ where obj#=:1 and enabled > 1 group by enabled) c where i.obj#=c.enabled(+) and i.obj# = ist.obj#(+) and i.bo#=:1 order by i.obj# |
7v9dyf5r424yh |
select NEWACTNO into :b0 from OLDNEWACT where OLDACTNO=:b1 |
7wwv1ybs9zguz |
update ICCIFNSACT set BORM_ADV_DATE=:b0, BOIS_MATURITY_DATE=:b1, BOIS_UNPD_BAL=:b2, BOIS_UNPD_INT=:b3, BOIS_BAL_FINE=:b4, BOIS_INT_FINE=:b5, BOIS_FINE_FINE=:b6, BORM_LOAN_TRM=:b7, BORM_FIVE_STAT=:b8, BOIS_ARREARS_CTR=:b9, BOIS_ARREARS_SUM=:b10 where BORM_MEMB_CUST_AC=:b11 |
83taa7kaw59c1 |
select name, intcol#, segcol#, type#, length, nvl(precision#, 0), decode(type#, 2, nvl(scale, -127/*MAXSB1MINAL*/), 178, scale, 179, scale, 180, scale, 181, scale, 182, scale, 183, scale, 231, scale, 0), null$, fixedstorage, nvl(deflength, 0), default$, rowid, col#, property, nvl(charsetid, 0), nvl(charsetform, 0), spare1, spare2, nvl(spare3, 0) from col$ where obj#=:1 order by intcol# |
4qubbrsr0kfn |
insert into wrh$_latch (snap_id, dbid, instance_number, latch_hash, level#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sleep1, sleep2, sleep3, sleep4, wait_time) select :snap_id, :dbid, :instance_number, hash, level#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sleep1, sleep2, sleep3, sleep4, wait_time from v$latch order by hash |
9qgtwh66xg6nz |
update seg$ set type#=:4, blocks=:5, extents=:6, minexts=:7, maxexts=:8, extsize=:9, extpct=:10, user#=:11, iniexts=:12, lists=decode(:13, 65535, NULL, :13), groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17, 0, NULL, :17), scanhint=:18 where ts#=:1 and file#=:2 and block#=:3 |
9vtm7gy4fr2ny |
select con# from con$ where owner#=:1 and name=:2 |
a2any035u1qz1 |
select owner#, name from con$ where con#=:1 |
a7nh7j8zmfrzw |
select CUSV_CUST_NO from CUMI_TMP where CHGFLAG='D' |