|
Re: Generate the execution plan for a stored procedure !! [message #159460 is a reply to message #159422] |
Sun, 19 February 2006 20:14 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
I don't believe that it is possible.
The procedural components of PL/SQL do not require a plan, but the embedded SQL statements do. To get the EXPLAIN PLAN of each of these, you have to cut them out into a separate file and explain them. When you do this, you must place a colon ':' before each of the PL/SQL variables in the SQL, otherwise the parser will think they are columns that do not exist.
An easier way is to trace (SQL Trace) a run of the procedure (assuming it is performing well enough to actually finish). Then use TK*Prof to read the trace file. It will show you the plan for every SQL. See the Oracle Utilities Manual for good instructions on using SQL Trace and TK*Prof.
_____________
Ross Leishman
|
|
|