I/O bottle neck을 찾기
작성자 관리자 작성시간 2004-03-04 12:18:05
 

* I/O bottle neck을 찾기 

a.
SQL> select phyrds,phywrts,d.name
  2  from v$datafile d, v$filestat f
  3  where d.file#=f.file#
  4  order by d.name;

    PHYRDS    PHYWRTS NAME
---------- ---------- --------------------------------------------------
        4          2 D:\ORACLE\ORADATA\IBM\DR01.DBF
        4          2 D:\ORACLE\ORADATA\IBM\INDX01.DBF
        18        16 D:\ORACLE\ORADATA\IBM\RBS01.DBF
      1061          5 D:\ORACLE\ORADATA\IBM\SYSTEM01.DBF  --> 가장 physical read가 많음
        4          2 D:\ORACLE\ORADATA\IBM\TEMP01.DBF
        4          2 D:\ORACLE\ORADATA\IBM\TOOLS01.DBF
        4          2 D:\ORACLE\ORADATA\IBM\USERS01.DBF

b. report.txt에서 찾기

SQL> Rem I/O should be spread evenly accross drives. A big difference between
SQL> Rem phys_reads and phys_blks_rd implies table scans are going on.
SQL> select table_space, file_name,
  2      phys_reads reads, phys_blks_rd blks_read, phys_rd_time read_time,
  3      phys_writes writes, phys_blks_wr blks_wrt, phys_wrt_tim write_time,
  4      megabytes_size megabytes,
  5      round(decode(phys_blks_rd,0,0,phys_rd_time/phys_blks_rd),2) avg_rt,
  6      round(decode(phys_reads,0,0,phys_blks_rd/phys_reads),2) "blocks/rd"
  7  from stats$files order by table_space, file_name;

TABLE_SPACE  FILE_NAME            READS BLKS_READ ......------------ -------------------- ----- --------- ......
....
scott_data  /disk2/scott_dat.dbf 61098    416752 ..... 
scott_index  /disk2/scott_ind.dbf    0        0 ........

여기서 주의해야 할점은 data에서는 I/O 가 크나 index에서는 없는것은 index가 잘 사용되지 않거나
필요한 index가 부족하다는것을 나타냄


목록 | 입력 | 수정 | 답변 | 삭제