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.
-------------------------------
Sometimes, you will want to know what is occurring at this very moment or what just occurred. When you need to know very specific details about the wait you are observing, v$session_wait shines. This view gives you a real-time view of a session's wait situation. It shows the current wait or the most recent completed wait event.
It is common to catch a session in the middle of a wait. For example, refer back to Figure 2-6 or Figure 2-7. If we just happened to query from v$session_wait while that session was waiting for the operating system to return the multiblock request, we would see that specific Oracle session posting a db file scattered read.
In addition to the real-time feature, v$session_wait also provides additional details that are lost when the wait details are summarized in the v$session_event and v$system_event views. This detailed information is contained in parameter columns: p1, p2, and p3. These parameter columns also have associated text and raw columns, providing even more information. These parameters are event-dependent; that is, their contents depend on the wait event. For example, if the wait event is db file scattered read, then p1 and p2 contain the first block's file number and block number, respectively, and p3 contains the number of blocks requested. But if the wait event is latch free, then p2 contains the latch number, which can be joined with v$latchname to determine the latch for which the session is waiting. Note that starting with Oracle Database 10g, v$session contains all the v$session_wait columns. Table 2-2 lists some of the important columns in this view.
©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.
|