Title: Message

First, you’re missing user-mode CPU time consumed by the Oracle session. The statistic that is supposed to hold this number is ‘CPU used by this session’ from v$sesstat. But there are bugs in that statistic. Second, some of the time that an Oracle process spends sleeping (because of context switches imposed by a timesharing operating system) isn’t counted either. See www.hotsos.com/dnloads/1/kevents/unaccounted-for.html for a start. Our Hotsos Clinic explains in complete detail.

 

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com

Upcoming events:
- Hotsos Clinic, Oct 1–3 San Francisco, Oct 15–17 Dallas, Dec 9–11 Honolulu
- 2003 Hotsos Symposium on Oracle® System Performance, Feb 9–12 Dallas
- Next event: Miracle Database Forum, Sep 20–22 Middlefart Denmark

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Terrian, Tom
Sent: Wednesday, September 04, 2002 4:00 PM
To: Multiple recipients of list ORACLE-L
Subject: waits vs. logons

 

I run the following query to compare the total waits for a session verses the seconds logged on:

 

select a.sid, a.ontime longon_secs, round(b.waittime) wait_secs
from
  (select sid, (sysdate - logon_time)*24*60*60  ontime
   from   v$session ) a,
  (select sid, sum(time_waited)/100 waittime
   from v$session_event
   group by sid) b
where a.sid = b.sid;

I get the following results:

 

       SID LONGON_SECS  WAIT_SECS
---------- ----------- ----------
         1      595995     595989
         2      595994     471204
         3      595994     595585
         4      595994     594580
         5      595994     595492
         6      595994     593639
         9      595993     577157
        14        4943       1303
        24      595844     588441
        26        1733       1728
        27        5308       2478
        29      517269          0
        32          53          0
        35      415158         13
        50      140478     140371
        51         719        507
        56       14507       8706
        59        2269        221

 

I am very much a novice when it comes to wait statistics.  When a session, for example #51, has been logged on for 719 seconds but has experienced only 507 wait seconds, what did it do the rest of the time?  I am assuming some kind of work?  Any way to determine what?

 

Tom

 

 

 

Reply via email to