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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is it possible to log milliseconds?

Re: Is it possible to log milliseconds?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 29 Oct 1998 18:25:15 GMT
Message-ID: <3647b2ac.104892827@192.86.155.100>


A copy of this was sent to Steinar Orset <steinar_at_quasar.no> (if that email address didn't require changing) On Thu, 29 Oct 1998 17:49:15 +0100, you wrote:

>Hello,
>I want to log the time used in different parts of my procedure.
>However SYSDATE can only log seconds as the smallest time unit as far as
>I know.
>Can I somehow log milliseconds?
>I use SYSDATE in this way:
>insert into temp(text) (select TO_CHAR(SYSDATE,'"Line 10: Time is=
>"HH12:MI:SS') from dual);
>
>I use Oracle7 Release 7.3.3.0.0.
>
>Any help is much appreciated.
>
>Regards Steinar-
>E-mail: steinar_at_quasar.no

You can get hundreds of seconds from some arbitrary 'epoch in time' and use that for measuring elapsed time. You can select hsecs from v$timer or use dbms_utility.get_time to get this counter.....

So, to time something you might code:

    l_start := dbms_utility.get_time;
    ....
    code goes here
    ....
    l_elapsed_time_in_hsecs := dbms_utility.get_time - l_start;  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Oct 29 1998 - 12:25:15 CST

Original text of this message

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