The link didn't work for me but this one will... http://asktom.oracle.com/pls/ask/f?p=4950:8:3586321077250690228 Interesting solution. S- On Fri, 30 Sep 2005, Kirtikumar Deshpande wrote: > Tom Kyte's web site has an answer: > http://asktom.oracle.com/pls/ask/f?p=4950:8:3586321077250690228::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:341817437103 > > - Kirti > > > > scott.hutchinson@xxxxxxxxxxxxxxxxxxxxx wrote: > 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)" : > > > 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@xxxxxxxxxxxxx > > [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of > > scott.hutchinson@xxxxxxxxxxxxxxxxxxxxx > > Sent: Friday, September 30, 2005 10:31 AM > > To: oracle-l@xxxxxxxxxxxxx > > 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 > > -- > > //www.freelists.org/webpage/oracle-l > > -- > > //www.freelists.org/webpage/oracle-l > > > > > > > ::This message sent using the free Web Mail service from http://TheName.co.uk > -- > //www.freelists.org/webpage/oracle-l > > > --------------------------------- > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. -- Stephen Rospo Principal Software Architect Vallent Corporation (formerly Watchmark-Comnitel) steve.rospo@xxxxxxxxxxx (425)564-8145 This email may contain confidential information. If you received this in error, please notify the sender immediately by return email and delete this message and any attachments. Thank you. -- //www.freelists.org/webpage/oracle-l