hi All,Tracing a session
I want to know a general thing about Stored
Procedures. When a Stored Procedure is executed, lots
of things happen (several selects, inserts, updates,
calling other SPs, data processing etc.), Is there
any method (e.g. STATS collection) available by which
I can find that out of total execution time, at what
place in the code Stored Procedure is spending most
of its time?
dbms_monitor.session_trace_enable()will give you a trace file that you run through tkprof and will detail which statement(s) are responsible for most of the time. Sprinkling your code with calls to dbms_application_info to set meaningful application information will allow this information to show up interactively in v$session. Both are documented in the performance tuning guide.
call your proc