오라클 성능 분석 방법론 정보
sys@ARTDOM>select gets, gethitratio, pins, pinhitratio, reloads, invalidations
2 from v$librarycache
3 where namespace ='SQL AREA';
GETS GETHITRATIO PINS PINHITRATIO RELOADS INVALIDATIONS
---------- ----------- ---------- ----------- ---------- -------------
340751 .990635391 1383994 .995631484 756 1197
sys@ARTDOM>select (sum(reloads)/sum(pins))*100 "MISS RATE"
2 from v$librarycache ;
MISS RATE
----------
.083522836
sys@ARTDOM> select to_char(trunc(sum(getmisses)/sum(gets)*100,5),0999.99)||'%(LESS THAN 15%)' "MISS RATE"
from v$rowcache ;
MISS RATE
-----------------------
4.05%(LESS THAN 15%)
sys@ARTDOM>select a.name, (b.misses/b.gets)*100 WAIT_RATIO
from v$latchname a, v$latch b
where a.name in ('redo allocation') and
a.latch# = b.latch# ;
NAME WAIT_RATIO
-------------------------------------------------- ----------
redo allocation .034880924
sys@ARTDOM>select name, value from v$sysstat where name ='redo log space requests';
NAME VALUE
-------------------------------------------------- ----------
redo log space requests 57
sys@ARTDOM> select name, phyrds, phywrts, phyblkrd, phyblkwrt
from v$filestat, v$datafile
where v$filestat.file# = v$datafile.file# ;
NAME PHYRDS PHYWRTS PHYBLKRD PHYBLKWRT
-------------------------------------------------- ---------- ---------- ---------- ----------
/u02b/ORACLE/ARTDOM/ARTDOM/system01.dbf 5381 18424 7194 19874
/u02b/ORACLE/ARTDOM/ARTDOM/undotbs01.dbf 47 11516 47 26253
/u02b/ORACLE/ARTDOM/ARTDOM/sysaux01.dbf 3212 19088 9979 26131
/u02b/ORACLE/ARTDOM/ARTDOM/DATA/users01.dbf 50 36 179 180
/u02b/ORACLE/ARTDOM/ARTDOM/example01.dbf 35 26 43 26
/u02b/ORACLE/ARTDOM/ARTDOM/DATA/users02.dbf 59 43 183 187
/u02b/ORACLE/ARTDOM/ARTDOM/DATA/users03.dbf 42 32 158 156
/u02b/ORACLE/ARTDOM/ARTDOM/DATA/users04.dbf 42 32 158 156
/u02b/ORACLE/ARTDOM/ARTDOM/DATA/users05.dbf 38 38 153 162
9 rows selected.
[v$filestat 정보]
PHYRDS NUMBER Number of physical reads done
PHYWRTS NUMBER Number of times DBWR is required to write
PHYBLKRD NUMBER Number of physical blocks read
PHYBLKWRT NUMBER Number of blocks written to disk, which may be the
same as PHYWRTS if all writes are single blocks
sys@ARTDOM>analyze table scott.emp compute statistics ;
Table analyzed.
sys@ARTDOM>select num_rows, chain_cnt from dba_tables where table_name ='EMP';
NUM_ROWS CHAIN_CNT
---------- ----------
14 0
sys@ARTDOM>!ls /app/oracle/product/10.1.0/rdbms/admin/utlchain.sql
/app/oracle/product/10.1.0/rdbms/admin/utlchain.sql
sys@ARTDOM>analyze table scott.emp list chained rows into CHAINED_ROWS ;
Table analyzed.
sys@ARTDOM>select count(*) from CHAINED_ROWS where table_name =upper('EMP');
COUNT(*)
----------
0
- 강좌 URL : http://www.gurubee.net/lecture/4174
- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.