Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_XPLAN.DISPLAY in PL/SQL?
idogan_tech_at_yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0411161547.3e077fd4_at_posting.google.com>...
> is there a way to call DBMS_XPLAN.DISPLAY within a pl/sql procedure ? if so how?
Yes, casting it as a table is one way:
begin
for i in (select plan_table_output from table (dbms_xplan.display))
loop
dbms_output.put_line (i.plan_table_output);
end loop;
end;
dellera_at_ORACLE9I> /
|* 5 | SORT JOIN | | | | |(snip)
| 6 | TABLE ACCESS FULL| T | | | |
--------------------------------------------------------------------
hth
Alberto Dell'Era
Received on Wed Nov 17 2004 - 04:39:22 CST