Professional Documents
Culture Documents
Oracle Wait Events That Everyone Should Know
Oracle Wait Events That Everyone Should Know
Kerry Osborne
Senior Oracle Guy
What Are Wait Events?
Do Less Work
tune SQL
reduce lio’s 7 / obj rule of thumb
Explain plan lies (see notes on this slide)
bigger buffer cache
Call Jack
Digression – Explain Plan Lies
WAIT #14: nam='db file scattered read' ela= 19389 file#=139 block#=44 blocks=5
obj#=83580
DB File Scattered Read – “fixes”
WAIT #10: nam='direct path write' ela= 4475 p1=401 p2=1518353 p3=57
WAIT #10: nam='direct path read' ela= 16770 p1=401 p2=1482031 p3=63
Direct Path Read/Write – “fixes”
Adjust PGA_AGGREGATE_TARGET
Turn off PX query
Call Randy
Log File Sync
WAIT #16: nam='log file sync' ela= 1286 buffer#=11910 p2=0 p3=0 obj#=84920
Log File Sync – “fixes”
Do Less Work (fewer commits)
Autocommit?
Row at a time processing with commits?
Often fixed by fixing Log File Sync (i.e. speed up i/o, etc)
WAIT #9: nam='log file switch (checkpoint incomplete)' ela= 986212 p1=0 p2=0 p3=0
Log file switch … – “fixes”
Do less work
Make total online log space bigger
Force more frequent incremental checkpoints
Speed up i/o
Buffer Busy Waits
Contention event for the same block
Read by other session (new event in 10g)
Held by other session in incompatible mode
Do Less Work
Reduce the amount of lio
WAIT #1: nam='SQL*Net message from client' ela= 336 driver id=1650815232 #bytes=1 p3=0 obj#=83660
SQL*Net message from client – “fixes”
WAIT #1: nam='SQL*Net message to client' ela= 2 driver id=1650815232 #bytes=1 p3=0 obj#=83660
SQL*Net message to Client – “fixes”
WAIT #1: nam='SQL*Net message to client' ela= 2 driver id=1650815232 #bytes=1 p3=0 obj#=83660
SQL*Net more data to client – “fixes”
NAME
----------------------------------------
library cache
Latches in 10g
Primarily Deal with major SGA areas
Shared Pool
Latch: shared pool
Latch: library cache
Latch row cache
Buffer Cache
Latch: cache buffer chains
Latch: cache buffers lru chain
Log Buffer
Latch: redo …
WAIT #28: nam='latch: shared pool' ela= 751 address=1611562656 number=213 tries=1 j#=46024
Latch: shared pool – “fixes”
Use Bind Variables
CURSOR_SHARING = FORCE
Increase SHARED_POOL
Kerry.Osborne@enkitec.com