You are on page 1of 26

Oracle

2003 11

....................................................................................................... 3
............................................................................................... 3
........................................................... 4
Oracle 10g .................................................... 4
Oracle ................................................................ 4
Oracle 10g ...................................... 5
Oracle 10g - ........................................................... 5
............................................................................... 6
....................................................................................... 6
........................................................................................... 6
....................................................................................... 7
(ASH).......................................................... 7
SQL ........................................................................... 8
............................................................................... 8
................................................................................... 8
AWR ......................................................................... 9
....................................... 9
..................................................................................................... 21
A............................................................................................ 22
ADDM ........................................................................ 22
B................................................................................................ 25
ADDM .................................................. 25

Oracle 10g Oracle 10g

Oracle
Oracle Enterprise Manager (EM)
Oracle
(AWR)
(ADDM) Oracle Enterprise Manager (EM)
Oracle Oracle

Oracle 200

Oracle
Oracle 10g
Oracle _MAKE_SQL_RUN_FASTER =
TRUE

(DBA)

DBA

DBA

1.

2.

Oracle 10g
Oracle 10g (ADDM)

1.

60

2.

3.

4.

5.

(AWR)

Oracle
Oracle 10g Oracle
10g Oracle
10g

10g

DBA
DBA
Oracle 10g

1.
2.
3.
4.

Oracle
10g
DBA
DBA

5.

6.

cpu
CPU

7.

SQL SQL
DBA
SQL

8.

SQL SQL WHERE

9.

DBA

10.

DBA

Oracle 10g

Oracle 10g

1.
2.

DBA
DBA ADDM A

FINDING 3:31% impact (7798 seconds)


-----------------------------------SQL statements were not shared due to the usage of
literals.This resulted in additional hard parses which were
consuming significant database time.
RECOMMENDATION 1:Application Analysis, 31% benefit (7798
seconds)
Investigate application logic for possible
use of bind variables instead of literals.
Alternatively, you may set the parameter
"cursor_sharing" to "force".
RATIONALE:SQL statements with PLAN_HASH_VALUE
3106087033 were found to be using literals.
in V$SQL for examples of such SQL statements.

DBA 30%

Oracle 10g

Oracle
Oracle 10g
Oracle

10g

Oracle 10g 700

TX
HW

1.

2.

3.

4.

5.


ITL HW ST

6.

I/O

7.

8.

SQL*Net message from


client

Oracle

8MB
x 8MB y
x-y 10g

V$SYS_TIME_MODEL V$SESS_TIME_MODEL

DB

Oracle
DB DB
DB

(ASH)

Oracle7 V$SESSION_WAIT
V$SESSION_WAIT

Oracle 10g V$ACTIVE_SESSION_HISTORY

IO

V$ACTIVE SESSION_HISTORY

V$ACTIVE_SESSION_HISTORY
SQL

1. Sid
2. SQL id
3.

4.

5.

6.

7.

SQL

SQL_idSQL_id
Oracle 10g SQL
V$SQL SQL
PLSQL Java
SQL SQL

CPU
CPU
CPU CPU

V$OSSTAT

15,000 IO 3 IO
27 IO

Oracle 10g

AWR

Oracle
8i Statspack 10g
AWR
Oracle
AWR
AWR
30 7

AWR Statspack

SQL
SQL

CPU

SQL
SQL

15 (ASH)
AWR ASH
AWR
Oracle 10g
ADDM EM

AWR Oracle 10g


(ADDM)
ADDM

10g SQL ADDM


AWR 30

ADDM OLTP

ADDM [ 1] AWR
ADDM

ADDM
ADDM

.
10

AWR ADDM
20%

1ADDM

ADDM
ADDM
Oracle HQ Oracle
Oracle
Oracle Support Statspack

ADDM
1. CPU

10

2.
3.
4.
5. IO
6. Oracle PGA

7. SQL
8. PL/SQL Java
9. MTTR
10. RAC
Statspack
Java SQL
ADDM
Statspack
B ADDM

ASH

ADDM
DBA

ADDM ADDM
EM EM ADDM
ADDM
A

11

Database Home Page

ADDM Findings

12

ADDM Recommendations

EM

DBA
DBA EM
AWR ADDM

13


CPU

CPU
CPU
CPU
Y
CPU Oracle
200 10
10 15

/
SQL

EM
ADDM EM

14

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM
D il

Session
D il

4
1

3
1.

CPU CPU 100%

2.

3.1 2.3

3.

4.

EM

15

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM Detail

Session Detail

1.

CPU CPU
CPU CPU

2.

CPU

16

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM Detail

Session Detail

1 Active Sessions WaitingConcurrency

2 Top SQL by Wait Count SQL

17

3 Top Session by Wait Count

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM Detail

Session Detail

1
2

1.
2.

SQL
CPU
CPU
Oracle

18

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM Detail

Session Detail

1
2
3

1.

2.

ADDM

19

3.

ADDM

DB Home

ADDM Page

Perf Page

Top Session

Top SQL

SQL Detail

Wait Detail

ADDM Detail

Session Detail

1. freelist

20


Oracle
Oracle
10g ADDMAWR ASH

Oracle
10g

21

A
ADDM

1 ADDM
2 ADDM

1
set long 1000000
set pagesize 50000
column get_clob format a80

1 ADDM

select dbms_advisor.get_task_report(task_name) as ADDM_report


from dba_advisor_tasks
where task_id = (
select max(t.task_id)
from dba_advisor_tasks t, dba_advisor_log l
where t.task_id = l.task_id
and t.advisor_name = 'ADDM'
and l.status = 'COMPLETED');

22

2 ADDM
DBMS_ADVISOR.GET_TASK_REPORT('BB')
------------------------------------------------------------------------------DETAILED ADDM REPORT FOR TASK 'bb' WITH ID 16
--------------------------------------------Analysis Period: 30-MAY-2003 from 10:27:57 to 10:31:03
Database ID/Instance: 1/1
Snapshot Range: from 9 to 10
Database Time: 1582 seconds
Average Database Load: 8.5 active sessions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FINDING 1: 13% impact (201 seconds)
----------------------------------A hot data block with concurrent read and write activity was found. The block
belongs to segment "RWBOLTON.TAB_BBW_DATABLOCK_I" and is block 70 in file 3.
RECOMMENDATION 1: Application Analysis, 13% benefit (201 seconds)
ACTION: Investigate application logic to find the cause of high
concurrent read and write activity to the data present in this block.
RELEVANT OBJECT: database block with object# 40984, file# 3 and
block# 70
RATIONALE: The SQL statement with SQL_ID "4vxy8fv4y3dhd" spent
significant time on "buffer busy waits" for the hot block.
RELEVANT OBJECT: SQL statement with SQL_ID 4vxy8fv4y3dhd
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3+:B2+1 WHERE REC_ID = :B1
RATIONALE: The SQL statement with SQL_ID "90n4zy8h6375p" spent
significant time on "buffer busy waits" for the hot block.
RELEVANT OBJECT: SQL statement with SQL_ID 90n4zy8h6375p
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3 WHERE REC_ID = :B2+:B1+1
SYMPTOMS THAT LED TO THE FINDING:
Wait class "Concurrency" was consuming significant database time. (24%
impact [375 seconds])
FINDING 2: 13% impact (201 seconds)
----------------------------------Read and write contention on database blocks was consuming significant
database time.
RECOMMENDATION 1: Schema, 13% benefit (201 seconds)
ACTION: Consider hash partitioning the INDEX
"RWBOLTON.TAB_BBW_DATABLOCK_I" with object id 40984 in a manner that
will evenly distribute concurrent DML across multiple partitions.
RELEVANT OBJECT: database object with id 40984
RATIONALE: The UPDATE statement with SQL_ID "4vxy8fv4y3dhd" was
significantly affected by "buffer busy waits".
RELEVANT OBJECT: SQL statement with SQL_ID 4vxy8fv4y3dhd
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3+:B2+1 WHERE REC_ID = :B1
RATIONALE: The UPDATE statement with SQL_ID "90n4zy8h6375p" was
significantly affected by "buffer busy waits".
RELEVANT OBJECT: SQL statement with SQL_ID 90n4zy8h6375p
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3 WHERE REC_ID = :B2+:B1+1
SYMPTOMS THAT LED TO THE FINDING:
Wait class "Concurrency" was consuming significant database time. (24%
impact [375 seconds])

23

2 ADDM
FINDING 3: 9.5% impact (149 seconds)
-----------------------------------Contention on buffer cache latches was consuming significant database time.
RECOMMENDATION 1: SQL Tuning, 4.3% benefit (68 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"4vxy8fv4y3dhd".
RELEVANT OBJECT: SQL statement with SQL_ID 4vxy8fv4y3dhd
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3+:B2+1 WHERE REC_ID = :B1
RECOMMENDATION 2: SQL Tuning, 4.3% benefit (68 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"90n4zy8h6375p".
RELEVANT OBJECT: SQL statement with SQL_ID 90n4zy8h6375p
UPDATE TAB_BBW_DATABLOCK SET REC_ID = :B3 WHERE REC_ID = :B2+:B1+1
SYMPTOMS THAT LED TO THE FINDING:
Wait class "Concurrency" was consuming significant database time. (24%
impact [375 seconds])
FINDING 4: 3.5% impact (56 seconds)
----------------------------------Hard parsing of SQL statements was consuming significant database time.
NO RECOMMENDATIONS AVAILABLE
ADDITIONAL INFORMATION: Hard parses due to cursor environment mismatch were
not consuming significant database time.
Hard parsing SQL statements that encountered parse errors was not
consuming significant database time.
The shared pool was adequately sized to prevent hard parses due to
cursor aging.
Hard parses due to literal usage and cursor invalidation were not
consuming significant database time.
SYMPTOMS THAT LED TO THE FINDING:
Parsing of SQL statements was consuming significant database time. (3.7%
impact [59 seconds])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ADDITIONAL INFORMATION
---------------------An explanation of the terminology used in this report is available when you
run the report with the 'ALL' level of detail.
The analysis of I/O performance is based on the default assumption that the
average read time for one database block is 5000 micro-seconds.
Wait class "Administrative" was not consuming significant database time.
Wait class "Application" was not consuming significant database time.
Wait class "Cluster" was not consuming significant database time.
Wait class "Commit" was not consuming significant database time.
Wait class "Configuration" was not consuming significant database time.
CPU was not a bottleneck for the instance.
Wait class "Network" was not consuming significant database time.
Wait class "Scheduler" was not consuming significant database time.
Wait class "Other" was not consuming significant database time.
Wait class "User I/O" was not consuming significant database time.
The flushing of snapshots 9 and 10 took 47 seconds which is 25% of the
analysis period time. This may reduce the reliability of the ADDM analysis.

24

B
ADDM
- Oracle Oracle CPU
- Top SQL
- CPU
-
- IO
- IO
- RAC
- PLSQL JAVA Top
- /
-
-
-
-
-
-
-
-
- dbms_lock pkg
- DML
- dbms_pipe.put
-
- ITL
-
- MTTR
I/O
- DBWR I/O
- archiver
-
-
-
-
-
- SGA
- PGA
-
-
- /
- /
-
- RAC
- LMS RAC

25


200311
Graham Wood, Kyle Hailey
Gaja Vaidyanatha, Connie Green, Karl Dias, Leng Tan
Oracle Corporation

500 Oracle Parkway


Redwood Shores, CA 94065
U.S.A.

+1.650.506.7000
+1.650.506.7200
www.oracle.com
Oracle
Oracle Oracle Corporation

Oracle Corporation

2002
.

You might also like