Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: explain plan from pl/sql ?
Actually, EXPLAIN PLAN is not a DLL, because it doesn't modify data
dictionary. And it doesn't commit your transaction. So I guess we can
only say it *is* a DML. EXECUTE IMMEDIATE works for DML and queries
too.
Yong Huang
"mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote in message news:<ecKdnYRoOPL32TeiRVn-jA_at_comcast.com>...
> good catch, thomas
>
> and the reason is that, although EXPLAIN PLAN is typically issues via
> SQL*Plus, it is not a SQL*Plus command, but a legal SQL statement -- but
> since it is not a DML statement, it is not directly supported by PL/SQL
>
> -- mcs
>
> "Thomas Wagner" <twa_priv_at_yahoo.com> wrote in message
> news:f695d6a3.0311052148.7a3abcea_at_posting.google.com...
> > idogan_tech_at_yahoo.com (Ibrahim DOGAN) wrote in message
> news:<6bf58828.0311050646.44eb8cbb_at_posting.google.com>...
> > > is it possible to run "explain plan" command within a PL/SQL block ?
> > >
> > > thanks,
> > > i.d.
> >
> > What about this:
> >
> > begin
> > execute immediate 'explain plan for select * from dual';
> > end;
> > /
> >
> > Regards
> > Thomas
Received on Fri Nov 07 2003 - 09:06:26 CST