Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Re: wierd runstats_pkg report
Not sure what you mean by "how to use". It's cumulative data, up to the current point in time.
So, look at V$SESSTAT for any given SID, and take a snapshot. Then, monitor the session doing it's work, and when it's done, take another snapshot. Subtract the values from the first snap from their corresponding values in the second snap, and you'll have statistics info for the duration of the window.
It's very similar to what StatsPack does and what Tom Kyte's RunStats package does.
For CPU time, you just need statistic #12, CPU used by this session. (Note that unlike latch numbers, the statistics numbers are invariant across Oracle versions, so, I know that 12 is CPU used by this session, regardless of what version you're on.) Only V$SYSSTAT has the NAME column built in, so if you're using V$SESSTAT or V$MYSTAT, you'll have to join to V$STATNAME.
Hope that helps,
-Mark
PS It's 'Cary Millsap', not 'Carrie Milsap'.
-----Original Message-----
From: Ryan [mailto:ryan.gaffuri_at_cox.net] Sent: Tue 3/23/2004 5:01 PM To: oracle-l_at_freelists.org Cc: Subject: Re: Re: wierd runstats_pkg reportcan someone point me to some good articles(other than the docs) on how to use the v$stat.. etc... views and such? Have any of you written any? Same with stuff on v$thread.
The docs arent very clear. I've got Carrie Milsap's tuning book, but havent
had time to read it cover to cover. Alot of that is in there.
----- Original Message -----
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni_at_espn.com>
To: <oracle-l_at_freelists.org>
Sent: Tuesday, March 23, 2004 3:42 PM
Subject: RE: Re: wierd runstats_pkg report
> v$mystat ... statistic is 'CPU used by this session'
>
> Raj
> --------------------------------------------------------------------------
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Mar 24 2004 - 00:47:21 CST---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------
- application/ms-tnef attachment: winmail.dat
![]() |
![]() |