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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Millisecond timer in PL/SQL

RE: Millisecond timer in PL/SQL

From: Kennedy, Jim <jim_kennedy_at_mentor.com>
Date: Fri, 30 Sep 2005 08:12:18 -0700
Message-ID: <EF25DB6D87DD1A469C80A312C63C3B4C04935EDA@SVR-ORW-EXC-07.mgc.mentorg.com>


Would a call to an external proc work? How about a simple Java program that returned what you are looking for? One would have to measure the overhead of the call.
Jim

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of scott.hutchinson_at_interact-analysis.com
Sent: Friday, September 30, 2005 8:10 AM To: Thomas.Mercadante_at_labor.state.ny.us
Cc: oracle-l_at_freelists.org
Subject: RE: Millisecond timer in PL/SQL

Thomas,

Unfortunatetly this only goes to 100th's of a second (same result as SELECT HSECS FROM V$TIMER). I'm after milliseconds.

Thanks,
Scott.

Quoting "Mercadante, Thomas F (LABOR)"
<Thomas.Mercadante_at_labor.state.ny.us>:

> Scott,
>
> How about:
>
> select dbms_utility.get_time from dual?
>
>
>
> function get_time return number;
> -- Find out the current time in 100th's of a second.
> -- Output argukments:
> -- get_time
> -- The time is the number of 100th's of a second from some
> -- arbitrary epoch.
>
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of
> scott.hutchinson_at_interact-analysis.com
> Sent: Friday, September 30, 2005 10:31 AM
> To: oracle-l_at_freelists.org
> Subject: Millisecond timer in PL/SQL
>
> All,
>
> I'm looking for a way to measure the elapsed time (in milliseconds) of

> executing a bunch of functions within a PL/SQL package. I've written
> a "timer"
> function that records this by using SYSTIMESTAMP, however is causes
> the sessions to spend a significant amount of time waiting on "cache
> buffers
>
> chains".
>
> Coding "w_date := SYSTIMESTAMP;" will result in a recursive "SELECT
> SYSTIMESTAMP FROM DUAL", and this is the sql being executed by
> sessions waiting on this latch (from v$session_wait and v$sqlarea).
>
> Does anyone have suggestions for ways that I can improve this?
>
> I have 50 concurrent sessions (batch jobs) running this, and each will

> call the "timer" function about 60 times per second. Originally I
> used V$TIMER, however the HSECS from this was not granular enough.
>
> Thanks,
>
> Scott Hutchinson
> Interact Analysis Ltd
>
> ::This message sent using the free Web Mail service from
> http://TheName.co.uk
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l
>

::This message sent using the free Web Mail service from http://TheName.co.uk

--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 30 2005 - 10:15:11 CDT

Original text of this message

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