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

Home -> Community -> Usenet -> c.d.o.server -> Re: Server execution timing in pl/sql

Re: Server execution timing in pl/sql

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Thu, 01 Jul 1999 15:51:02 GMT
Message-ID: <01bec3ea$10d7e320$a504fa80@mndnet>


Hi -

You can get the time in 100th of a second from dbms_utility.get_time.

You have to declare start_time and end_time as binary_integer and then subtract them.

e.g.

start_time := dbms_utility.get_time;
......
......
end_time := dbms_utility.get_time;
dbms_output.put_line(end_time - start_time);

Later !!!

Suresh Bhat
Oracleguru
www.oracleguru.net

Jeremy Ovenden <jovenden_at_hazelweb.co.uk> wrote in article <7lfush$mm$1_at_gxsn.com>...
> Say I have a pl/sql procedure, in SQLPLUS I can SET TIMING ON and when
the
> procedure runs, it wil display something like 'real: 231' which means 231
> milliseconds execution time. I would like to be able to get this level of
> accuracy within a plsql programso that it can record/report on this data.
>
> So far I have only worked out how to get timings to the nearest second
> (subtracting start datetime from end datetime) e.g.
> elapsed_time := ((enddate - startdate) * 86400)
>
> which yields the result in seconds.
>
> How can I get down to milliseconds?
>
> TIA
>
> Jeremy
>
>
>
Received on Thu Jul 01 1999 - 10:51:02 CDT

Original text of this message

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