You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
Figure 5-22 ranks SQL statements that waited for scattered reads over the past 15 minutes. Figure 5-21 shows 95% of the wait time is IO-related and 40% of the IO waits are related to multiblock requests (see the db file scattered read entry). Figure 5-22 shows that just one SQL statement is responsible for 32% of the multiblock reads. So an application-focused solution is to tune the SQL statement 3r5xuxmggzwt8.
Figure 5-22. Each ASH sample is related to a single SQL statement and if waiting, there will be an associated wait event. In this situation, we want to list the SQL that has been waiting the most for multiblock reads over the last 15 minutes.
A subtle yet very distinct analysis step occurred. Without ASH,11 when performing our ORTA, the wait event db file scattered read directs us to look for SQL requesting blocks outside Oracle's cache. We would typically look at the view v$sql and sort the SQL by the disk_reads column. Sure enough, we would discover a few SQL statements responsible for most of the scattered reads. But the situation is entirely different with ASH. Because v$activity_session_history session samples contain both the SQL identifier (column SQL_ID) along with the wait event (column EVENT), we absolutely know the SQL associated with the wait event. So we don't infer the associated SQL, which does leave a little room for mistakes.12 As long as ASH samples frequently enough, the chance of identifying the wrong SQL statement is about zero.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|