Toad World® Forums

execution time of procedure or a package in toad???


#1

Hello,
How would i find the execution time of Package or a procedure …

when i right click on procedure and then select execute procedure, it executes saying the pl/SQL procedure successfully completed ....But how would i know, how long it took to run the procedure....???

I m looking for something similar to the elapsed time in sql plus…when you run a procedure it gives you an execution time …

Thank you so much!!


#2

You want to check out my favorite feature, the Profiler.

http://www.toadworld.com/Default.aspx?tabid=67&EntryID=76


#3

It looks we cannot find out the execution time with toad for procedures or for a package …

Any thoughts on this thread!!!

Thank you!!


#4

It looks we cannot find out the execution time with toad for procedures or
for a package …

Well… I can’t say how to get the time from a right-click on the
browser. I really don’t know.

However, if you type in “exec ” in the editor then
hit F5, you’ll get the run time on the little information bar.

Roger S.


#5

Or additionally, add the following command prior to your “exec” call:-

Set timing on

It’s the easy way I get a client side measure of the time the call to a
procedure took. Of course, as previously mentioned, the profiler is much
better, and measures things on the server side rather than the client
side.

Regards,

Mike McAllister
Principal Systems Engineer
TKC Global, LLC
Phone: 512 423 7447
Email: michael@pairofsixes.com


#6

If you bring up your SP/function in schema browser and right-click and try to execute the same, you would get a window like below (my example takes 2 params and it is a function):

DECLARE
RetVal varchar2(200);
V_NPA VARCHAR2(200);
V_NXX VARCHAR2(200);

BEGIN
V_NPA := ‘425’;
V_NXX := ‘742’;

RetVal := LERG1.GET_RC ( V_NPA, V_NXX );
COMMIT;
END;

If you cut/paste this in your Toad Editor window and bulk execute (icon saying “Execute as Script”), it would give the execution time, just like a normal sql execution.

Hope this helps

Sunil