ADDM 보고서 분석 및 튜닝

1. ADDM(Automatic Database Diagnostic Monitor) 의 개념

  • AWR 데이타를 이용해 DB 의 문제점을 자동으로 분석하는 10G 신기능
  • DBA_HIST_SYS_TIME_MODEL.STAT_NAME ='DB time' 기준, 시간 DB time 에 가장 큰 영향을 준 요소 점검
  • DB time = DB Service time = CPU 시간 + 대기 시간
  • 고로, CPU 시간을 낮추거나, 대기 시간을 낮춤으로 접근

2.ADDM 보고서 생성

  • 수행 예제

SQL> @$ORACLE_HOME/rdbms/admin/addmrpt.sql

Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 1008930263 TGDOM              1 TGDOM_T


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     Inst Num DB Name      Instance     Host
------------ -------- ------------ ------------ ------------
* 1008930263        1 TGDOM       TGDOM_T     ktx6600d

Using 1008930263 for database Id
Using          1 for instance number


Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed.  Pressing <return> without
specifying a number lists all completed snapshots.


Listing the last 3 days of Completed Snapshots

                                                        Snap
Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
TGDOM_T     TGDOM           28166 06 Jan 2013 00:00      1
                              28167 06 Jan 2013 01:00      1
                              28168 06 Jan 2013 02:00      1
                              28169 06 Jan 2013 03:00      1
                              28170 06 Jan 2013 04:00      1
                              28171 06 Jan 2013 05:00      1
                              28172 06 Jan 2013 06:00      1
                              28173 06 Jan 2013 07:00      1
                              28174 06 Jan 2013 08:00      1
                              28175 06 Jan 2013 09:00      1
                              28176 06 Jan 2013 10:00      1
                              28177 06 Jan 2013 11:00      1
                              28178 06 Jan 2013 12:00      1
                              28179 06 Jan 2013 13:00      1
                              28180 06 Jan 2013 14:00      1
                              28181 06 Jan 2013 15:00      1
                              28182 06 Jan 2013 16:00      1
                              28183 06 Jan 2013 17:00      1
                              28184 06 Jan 2013 18:00      1
                              28185 06 Jan 2013 19:00      1
                              28186 06 Jan 2013 20:00      1
                              28187 06 Jan 2013 21:00      1
                              28188 06 Jan 2013 22:00      1
                              28189 06 Jan 2013 23:00      1
                              28190 07 Jan 2013 00:00      1
                              28191 07 Jan 2013 01:00      1
                              28192 07 Jan 2013 02:00      1
                              28193 07 Jan 2013 03:00      1
                              28194 07 Jan 2013 04:00      1
                              28195 07 Jan 2013 05:00      1
                              28196 07 Jan 2013 06:00      1
                              28197 07 Jan 2013 07:00      1
                              28198 07 Jan 2013 08:00      1
                              28199 07 Jan 2013 09:00      1
                              28200 07 Jan 2013 10:00      1
                              28201 07 Jan 2013 11:00      1
                              28202 07 Jan 2013 12:00      1
                              28203 07 Jan 2013 13:00      1
                              28204 07 Jan 2013 14:00      1
                              28205 07 Jan 2013 15:00      1
                              28206 07 Jan 2013 16:00      1
                              28207 07 Jan 2013 17:00      1
                              28208 07 Jan 2013 18:00      1
                              28209 07 Jan 2013 19:00      1
                              28210 07 Jan 2013 20:00      1
                              28211 07 Jan 2013 21:00      1
                              28212 07 Jan 2013 22:00      1
                              28213 07 Jan 2013 23:00      1
                              28214 08 Jan 2013 00:00      1
                              28215 08 Jan 2013 01:00      1
                              28216 08 Jan 2013 02:00      1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 28215
Begin Snapshot Id specified: 28215

Enter value for end_snap: 28216
End   Snapshot Id specified: 28216



Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is addmrpt_1_28215_28216.txt.  To use this name,
press <return> to continue, otherwise enter an alternative.

Enter value for report_name:           

Using the report name addmrpt_1_28215_28216.txt


Running the ADDM analysis on the specified pair of snapshots ...


Generating the ADDM report for this analysis ...


          DETAILED ADDM REPORT FOR TASK 'TASK_139391' WITH ID 139391
          ----------------------------------------------------------

              Analysis Period: 08-JAN-2013 from 01:00:09 to 02:00:21
         Database ID/Instance: 1008930263/1
      Database/Instance Names: TGDOM/TGDOM_T
                    Host Name: ktx6600d
             Database Version: 10.2.0.4.0
               Snapshot Range: from 28215 to 28216
                Database Time: 80 seconds
        Average Database Load: 0 active sessions

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

THERE WAS NOT ENOUGH DATABASE TIME FOR ADDM ANALYSIS.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          ADDITIONAL INFORMATION
          ----------------------

There was no significant database activity to run the ADDM.

The analysis of I/O performance is based on the default assumption that the
average read time for one database block is 10000 micro-seconds.

An explanation of the terminology used in this report is available when you
run the report with the 'ALL' level of detail.



End of Report
Report written to addmrpt_1_28215_28216.txt
SQL> 

SQL 튜닝 권고자(SQL Tuning Advisor)
: SQL 을 분석하여 자동으로 최적화된 SQL 을 제시하는 기능, SQL 자동 튜닝 수행 시, 다음과 같은 작업을 수행 한다.

  • 오브젝트 통계 분석
  • SQL 프로파일 생성
  • SQL 액세스 패스 분석
  • SQL 구조 분석
    ==> 튜닝 알고리즘이 완벽하지 않다
    ==> SQL 튜닝 권고자 제시 SQL 에 대한 검증 필요