Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> waits vs. logons

waits vs. logons

From: Terrian, Tom <tterrian_at_daas.dla.mil>
Date: Wed, 04 Sep 2002 12:59:40 -0800
Message-ID: <F001.004C7C80.20020904125940@fatcity.com>


Content-Type: text/plain

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      

------_=_NextPart_001_01C25449.01D928F0
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=658191819-04092002>I run the following
query to compare the total waits for a session verses the seconds logged on:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=658191819-04092002></SPAN></FONT><FONT
face=Arial size=2><SPAN class=658191819-04092002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=1><SPAN class=658191819-04092002>select
a.sid, a.ontime longon_secs, round(b.waittime) wait_secs<BR>from <BR>&nbsp; (select sid, (sysdate - logon_time)*24*60*60&nbsp; ontime<BR>&nbsp;&nbsp; from&nbsp;&nbsp; v$session ) a,<BR>&nbsp; (select sid, sum(time_waited)/100 waittime<BR>&nbsp;&nbsp; from v$session_event <BR>&nbsp;&nbsp; group by sid) b<BR>where a.sid = b.sid;<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=658191819-04092002>I get the following
results:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=658191819-04092002>&nbsp;<FONT
face="Courier New" size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SID LONGON_SECS&nbsp; WAIT_SECS<BR>---------- -----------
----------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 595995&nbsp;&nbsp;&nbsp;&nbsp; 595989<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 595994&nbsp;&nbsp;&nbsp;&nbsp; 471204<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 595994&nbsp;&nbsp;&nbsp;&nbsp; 595585<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 595994&nbsp;&nbsp;&nbsp;&nbsp; 594580<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 595994&nbsp;&nbsp;&nbsp;&nbsp; 595492<BR>&nbsp;&nbsp;&nbsp;&nb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bsp;&nbsp;&nbsp;&nbsp;&nbsp; 35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
415158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 140478&nbsp;&nbsp;&nbsp;&nbsp; 140371<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 51&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 719&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 507<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
56&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14507&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
8706<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
59&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
2269&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 221</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=658191819-04092002>I am very much a
novice when it comes to wait statistics.&nbsp; 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?&nbsp; I am assuming some kind of work?&nbsp; Any way to determine what?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002>Tom</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN

class=658191819-04092002>&nbsp;</DIV></SPAN></FONT></BODY></HTML>

------_=_NextPart_001_01C25449.01D928F0--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Terrian, Tom
  INET: tterrian_at_daas.dla.mil

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Sep 04 2002 - 15:59:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US