DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Tuning views - what are the time units?

  1. #1
    Join Date
    Aug 2000
    Posts
    236
    When tuning, we use all these v$ views like v$waitstat, v$sesstat etc.

    Where ever times are given, what are the units? seconds, millseconds?

    Even the Oracle 8i reference does not mention it.

    Thanks,
    Nizar

  2. #2
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    Good Question

    Hi, 28th May 2001 20:07 hrs chennai

    I dont know why i love much to answering Tuning Questions.

    Here Goes the solution for your Question.

    This from an oracle Q:A from an Article
    -----------------------------------------------
    All statistics in the V$ views are either in seconds or centiseconds, and I am not aware of any documentation bugs regarding this. Support are definitely wrong about V$FILESTAT showing milliseconds. There was a paper circulating about 2 years ago that made that claim, and that may be where the information is coming from, but it is clearly wrong. The only use of milliseconds in Oracle is that the SET TIMING ON command returns milliseconds on some platforms. If you suspect a documentation bug, the only way to check is to measure whatever it is against a known timer such as V$TIMER or DBMS_UTILITY.GET_TIME.

    ---------------------------
    V$TIMER
    This view lists the elapsed time in hundredths of seconds. Time is measured since the beginning of the epoch, which is operating system specific, and wraps around to 0 again whenever the value overflows four bytes (roughly 497 days).

    The wait events are always timed in centiseconds, although SET TIMING ON returns milliseconds on some platforms.

    Here's an example ...
    SQL> select time_waited from v$system_event where event = 'PL/SQL lock timer';

    no rows selected

    SQL> set timing on
    SQL> execute sys.dbms_lock.sleep(10);

    PL/SQL procedure successfully completed.

    real: 10245

    SQL> select time_waited from v$system_event where event = 'PL/SQL lock timer';

    EVENT TIME_WAITED
    -------------------------------------------------- -----------
    PL/SQL lock timer 1024

    Others can well put in your valuable ideas to build up this topic.

    Cheers

    Padmam
    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

  3. #3
    Join Date
    Aug 2000
    Posts
    236

    To Padmam - Other members sorry & please excuse

    Padmam,

    Thanks for your reply. I am from Chennai myself though I am working in the Gulf for a long time. Know a few Bitech guys personally, would love to talk to you outside the forum.

    If you have no reservations, can you send me your email to:

    nabaig@riyadh.ingr.com

    Thanks,

    Nizar.

  4. #4
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    Brave scott, you are absolutely right ! My main guide was the Craig A. Shallahamer paper about wait event, but it was plain wrong ! I visited again Craigs´s site and yes, there is a new version of the paper, now saying centisecounds - a result of dba support sayings, here ??

    Regards,

    Chiappa

    PS : following here is the result of my tests in NT and Unix, in v7 and 8ir3, and all says YES (just with some small roundings in the result):

    ==> v7 WinNT
    sys@po7::SQL>select time_waited from v$system_event where event = 'PL/SQL lock timer';
    no rows selected
    sys@po7::SQL>
    sys@po7::SQL>set timing on
    sys@po7::SQL>execute sys.dbms_lock.sleep(10);

    PL/SQL procedure successfully completed.

    real: 11485
    sys@po7::SQL>
    sys@po7::SQL>select time_waited from v$system_event where event = 'PL/SQL lock timer';

    TIME_WAITED
    -----------
    1000

    1 row selected.

    real: 93
    sys@po7::SQL>

    ==> v7 AIX

    desa:/usr/oracle> sqlplus sys

    SQL*Plus: Release 3.3.4.0.0 - Production on Tue May 29 09:38:43 2001

    Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.

    Enter password:

    Connected to:
    Oracle7 Server Release 7.3.4.5.0 - Production
    With the distributed and parallel query options
    PL/SQL Release 2.3.4.5.0 - Production

    SQL> set timing on

    SQL>execute sys.dbms_lock.sleep(10);

    PL/SQL procedure successfully completed.

    Elapsed: 00:00:10.26

    SQL>select time_waited from v$system_event where event = 'PL/SQL lock timer';
    TIME_WAITED
    -----------
    1001

    Elapsed: 00:00:00.34


    ==> v8 WinNT

    sys@o8ir3::SQL>set timing on
    sys@o8ir3::SQL>execute sys.dbms_lock.sleep(10);

    PL/SQL procedure successfully completed.

    real: 10594
    sys@o8ir3::SQL>select time_waited from v$system_event where event = 'PL/SQL lock timer';

    TIME_WAITED
    -----------
    1025

    1 row selected.

    real: 281


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width