Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: explain plan from pl/sql ?

Re: explain plan from pl/sql ?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 07 Nov 2003 09:24:49 -0800
Message-ID: <1068225910.273499@yasure>


mcstock wrote:

>you got me...
>
>according to the PL/SQL manual:
>
>By extending SQL, PL/SQL offers a unique combination of power and ease of
>use.
>You can manipulate Oracle data flexibly and safely because PL/SQL fully
>supports
>all SQL data manipulation statements (except EXPLAIN PLAN), transaction
>control
>statements, functions, pseudocolumns, and operators.
>
>and, as EXPLAIN plan does no commit, ROLLBACK does clear the uncommitted
>rows from the PLAN_TABLE
>
>good call
>
>-- mcs
>"Yong Huang" <yong321_at_yahoo.com> wrote in message
>news:b3cb12d6.0311070706.77946620_at_posting.google.com...
>
>
>>Actually, EXPLAIN PLAN is not a DLL [DDL], 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
>>>>
>>>>

Oracle has already published statements that the DBMS_XPLAN built-in package should
be used rather than Explain Plan. Why the discussion of something Oracle has advised be
dropped?

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Nov 07 2003 - 11:24:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US