处理方法如下:
--通过报告确定latch: cache buffers chains 等待
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
latch: cache buffers chains 74,642 35,421 475 6.1 Concurrenc
CPU
time
11,422 2.0
log
file sync
34,890 1,748 50 0.3 Commit
latch
free
2,279 774 340 0.1 Other
db
file parallel write 18,818 768 41 0.1 System I /O
-------------------------------------------------------------
--找出逻辑读高sql
SQL ordered by Gets DB /Inst : Snaps: 1-2
-> Resources reported
for PL /SQL
code includes the resources used by all SQL
statements called by the code.
-> Total Buffer Gets: 265,126,882
-> Captured SQL account
for 99.8% of Total
Gets CPU Elapsed
Buffer Gets Executions per Exec %Total Time (s) Time (s) SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
256,763,367 19,052 13,477.0 96.8
######## ######### a9nchgksux6x2
Module: JDBC Thin Client
SELECT * FROM SALES ....
1,974,516 987,056 2.0 0.7 80.31 110.94 ct6xwvwg3w0bv
SELECT COUNT(*) FROM ORDERS ....
--逻辑读大对象
Segments by Logical Reads
-> Total Logical Reads: 265,126,882
-> Captured Segments account
for 98.5% of Total
Tablespace Subobject Obj. Logical
Owner Name Object Name Name Type Reads %Total
---------- ---------- -------------------- ---------- ----- ------------ -------
DMSUSER USERS SALES TABLE 212,206,208 80.04
DMSUSER USERS SALES_PK INDEX 44,369,264 16.74
DMSUSER USERS SYS_C0012345 INDEX 1,982,592 .75
DMSUSER USERS ORDERS_PK INDEX 842,304 .32
DMSUSER USERS INVOICES TABLE 147,488 .06
-------------------------------------------------------------
处理思路:
1.Look
for SQL that accesses the blocks
in question and determine
if the repeated reads are necessary.
This may be within a single session or across multiple sessions.
2.Check
for suboptimal SQL (this is the most common cause of the events)
look
at the execution plan for
the SQL being run and try to reduce the
gets per executions
which will minimize the number of blocks being accessed
and therefore reduce the chances of multiple sessions contending
for the same block.
|