Use Explain Plan in TOAD

in Oracle Development; Hi guys, i realise that we can use explain plan in Toad also, but some of my colleagues say that ...

+ Post Reply + Post New Topic
Results 1 to 4 of 4
  1. #1
    oracle_new's Avatar
    oracle_new is offline Forum Expert oracle_new is on a distinguished road
    Join Date
    30 Aug 2008
    Posts
    19
    Document Uploads
    0

    Helpful? Yes No

    Use Explain Plan in TOAD

    Hi guys, i realise that we can use explain plan in Toad also, but some of my colleagues say that explain plans should only be used from SQL Plus. Is it that Explain Plan from Toad are not reliable?

  2.    Club-Oracle Complementary E-Books and Magazines
    Get your free Complementary Copy of Oracle Magazine

    You can also browse the Free Magazines and E-Books section to see the complete list of free magazines, e-books and Whitepapers.

  3. #2
    rajavu's Avatar
    rajavu is offline Forum Genius rajavu is on a distinguished road
    Join Date
    13 Oct 2008
    Location
    @ Bangalore , India
    Posts
    482
    Document Uploads
    0

    Helpful? Yes No

    Re: Use Explain Plan in TOAD

    Toad Explain plan information is absolutely reliable .

    Check these links in case of any issues

    link1
    link2

    Raj.

  4. #3
    tyro's Avatar
    tyro is offline Forum Genius tyro is on a distinguished road
    Join Date
    20 Aug 2008
    Location
    India
    Posts
    362
    Document Uploads
    0

    Helpful? Yes No

    Re: Use Explain Plan in TOAD

    TOAD issues 'explain plan set statement_id = ... into plan_table for 'select ...' in the background when you use the Explain Plan, so there's really no difference whatsoever.

  5. #4
    zargon's Avatar
    zargon is offline Forum Guru zargon is on a distinguished road
    Join Date
    22 Oct 2008
    Location
    Here, or maybe there, or ...
    Posts
    506
    Document Uploads
    0

    Helpful? Yes No

    Re: Use Explain Plan in TOAD

    There can be differences, as the PLAN_TABLE definition provided by Quest may be out of date. Yes, Oracle can still use the table, and what plan information it can insert will be current, but you are likely to miss details a current PLAN_TABLE definition would contain, such as predicate and filter information, estimated TEMP space consumption, estimated execution time and the option to gather plan statistics to produce a more detailed report:

    SQL> select * from table(dbms_xplan.display_cursor('dmfdcmvwkgfqh',0, 'ALL ALLSTATS'));

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    --
    SQL_ID dmfdcmvwkgfqh, child number 0
    -------------------------------------
    select /*+ gather_plan_statistics */ distinct owner from v$access

    Plan hash value: 174934893

    ------------------------------------------------------------------------------------------------------------------------------------------------------
    ---
    | Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | OMem | 1Mem | O/1/M
    |
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    ---
    | 1 | HASH UNIQUE | | 1 | 15 | 1305 | 5 (100)| 00:00:01 | 4 |00:00:00.10 | | |
    |
    | 2 | NESTED LOOPS | | 1 | 433 | 37671 | 4 (100)| 00:00:01 | 394 |00:00:00.09 | | |
    |
    | 3 | NESTED LOOPS | | 1 | 433 | 29877 | 3 (100)| 00:00:01 | 394 |00:00:00.06 | | |
    |
    |* 4 | HASH JOIN | | 1 | 433 | 16021 | 1 (100)| 00:00:01 | 335 |00:00:00.03 | 1236K| 1236K| 1/0
    /0|
    |* 5 | FIXED TABLE FULL | X$KSUSE | 1 | 170 | 2040 | 0 (0)| | 170 |00:00:00.01 | | |
    |
    | 6 | FIXED TABLE FULL | X$KGLLK | 1 | 433 | 10825 | 1 (100)| 00:00:01 | 335 |00:00:00.01 | | |
    |
    |* 7 | FIXED TABLE FIXED INDEX| X$KGLDP (ind:1) | 335 | 1 | 32 | 0 (0)| | 394 |00:00:00.03 | | |
    |
    |* 8 | FIXED TABLE FIXED INDEX | X$KGLOB (ind:1) | 394 | 1 | 18 | 0 (0)| | 394 |00:00:00.03 | | |
    |
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    ---

    Query Block Name / Object Alias (identified by operation id):
    -------------------------------------------------------------

    1 - SEL$5C160134
    5 - SEL$5C160134 / S@SEL$3
    6 - SEL$5C160134 / L@SEL$3
    7 - SEL$5C160134 / D@SEL$3
    8 - SEL$5C160134 / O@SEL$3

    Predicate Information (identified by operation id):
    ---------------------------------------------------

    4 - access("L"."KGLLKUSE"="S"."ADDR")
    5 - filter("S"."INST_ID"=USERENV('INSTANCE'))
    7 - filter(("L"."KGLLKHDL"="D"."KGLHDADR" AND "L"."KGLNAHSH"="D"."KGLNAHSH"))
    8 - filter(("O"."KGLNAHSH"="D"."KGLRFHSH" AND "O"."KGLHDADR"="D"."KGLRFHDL"))

    Column Projection Information (identified by operation id):
    -----------------------------------------------------------

    1 - "O"."KGLNAOWN"[VARCHAR2,64]
    2 - "O"."KGLNAOWN"[VARCHAR2,64]
    3 - "D"."KGLRFHDL"[RAW,8], "D"."KGLRFHSH"[NUMBER,22]
    4 - (#keys=1) "L"."KGLNAHSH"[NUMBER,22], "L"."KGLLKHDL"[RAW,8]
    5 - "S"."ADDR"[RAW,8], "S"."INST_ID"[NUMBER,22]
    6 - "L"."KGLLKUSE"[RAW,8], "L"."KGLLKHDL"[RAW,8], "L"."KGLNAHSH"[NUMBER,22]
    7 - "D"."KGLHDADR"[RAW,8], "D"."KGLNAHSH"[NUMBER,22], "D"."KGLRFHDL"[RAW,8], "D"."KGLRFHSH"[NUMBER,22]
    8 - "O"."KGLHDADR"[RAW,8], "O"."KGLNAOWN"[VARCHAR2,64], "O"."KGLNAHSH"[NUMBER,22]


    48 rows selected.

    Remember, too, that EXPLAIN PLAN is an estimated execution path for the query, based upon cursory examination of relevant statistics; the query is not executed so it doesn't go through the same process of parsing and plan generation as an executed query would. Setting autotrace on returns a plan based upon the actual execution of the query, and the plans returned by EXPLAIN PLAN and autotrace can differ.

Similar Threads

  1. Replies: 1
    Last Post: 06-03-2010, 10:59 AM
  2. Problem in Creating Performance Mgmt plan
    By Mohit Shukla in forum Oracle HRMS & Payroll
    Replies: 0
    Last Post: 12-05-2009, 07:46 AM
  3. OEM as well as TOAD
    By noufal_y in forum Server Administration and Options
    Replies: 2
    Last Post: 09-02-2009, 06:03 AM
  4. Please Explain dis- In eAM
    By freakometieran in forum Oracle SCM
    Replies: 4
    Last Post: 07-22-2009, 07:51 AM
  5. Using Discoverer to report on people not enrolled in a medical plan
    By Mac in forum Oracle Developer Suite and Tools
    Replies: 1
    Last Post: 02-02-2009, 05:03 PM