Re: Measuring processtime in PL/SQL

From: Eric Hansen <erichansen_at_mindspring.com>
Date: 1997/03/08
Message-ID: <33217399.1065944_at_news.mindspring.com>#1/1


"Petter Harnes" <Petter.Harnes_at_teleplan.no> wrote:

>I hav a PL/SQL program that does a triple loop (loop within a loop within a
>loop).
>Two of theese are cursor loops.
>Witin the innermost loop there is performed a large number of
>SQL-statements.
>In a testexamples these statements are called a total of 2*23*5=230 times.
>The total process time is about 11 seconds.
>I have to speed up the application and want to measure each of the
>statements in the loop.
>To measure the total time I used TO_NUMBER(TO_CHAR(SYSDATE,'SSSSS')). But
>this only gives me number of seconds and since each statements is taking
>less than one second I cannot use this function. I cannot find any other
>function to get the time with high enough precision.

In the DBMS_UTILITY package there's a function called GET_TIME which returns the number of 100th's of seconds since a fixed time. What you do is call the function and store the number before your statement, then call it again after. Then just subtract the two. Received on Sat Mar 08 1997 - 00:00:00 CET

Original text of this message