Craig Shallahamer's Blog
|
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.
-------------------------------
<p>Figure 5-7 contains the same SQL as in Figure 5-6, but Figure 5-7 is reporting on an active server process, whereas Figure 5-6 is looking at the database writer background process. As we would expect, the time model CPU consumption is recorded in the DB CPU statistics as 430,836 ms, which is 0.43 second. The v$sesstat CPU consumption records the server processes has consumed 39 cs, which is 0.39 second. This time difference should not surprise you. If you take any Statspack or AWR report and compare these statistics, you will notice there is always a difference-but probably not enough to throw off the v$sysstat-based service time analysis. Since the time model is based on increased instrumentation granularity, if possible, always use the time model views.
</p><p>Figure 5-7. This is a sample CPU consumption query for an Oracle server process. Notice the v$sess_time_model CPU consumption is properly allocated in the DB CPU bucket. Also notice the CPU times are slightly different. The time model view shows CPU consumption at 0.43 second, whereas the v$sesstat view shows it to be 0.39 second.
</p><p>The time model views clearly differentiate background and server process time, plus we still can gather the parse time and recursive time values from v$sysstat. To save paper, I did not paste in a sample script. However, the script is very similar to the one shown in Figures 5-3 and 5-4. It's just a little more complicated because two views are used (v$sysstat and v$sys_time_model) and we have one additional class for the background process CPU consumption.
</p>
©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.
|
|
Know what's important before it's too late!
OraPub's Performance Training is like no other...
More Class Pics...
Get student testimonials!
|