How do I view the Explain Plan in Oracle Sql developer?

后端 未结 3 443
刺人心
刺人心 2020-12-13 12:32

I have few SQL queries which has very low query running performance and I want to check the query execution plan for this query. I am trying to execute the below query but i

3条回答
  •  Happy的楠姐
    2020-12-13 12:59

    EXPLAIN PLAN FOR

    In SQL Developer, you don't have to use EXPLAIN PLAN FOR statement. Press F10 or click the Explain Plan icon.

    enter image description here

    It will be then displayed in the Explain Plan window.

    If you are using SQL*Plus then use DBMS_XPLAN.

    For example,

    SQL> EXPLAIN PLAN FOR
      2  SELECT * FROM DUAL;
    
    Explained.
    
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------
    Plan hash value: 272002086
    
    --------------------------------------------------------------------------
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
    --------------------------------------------------------------------------
    
    8 rows selected.
    
    SQL>
    

    See How to create and display Explain Plan

提交回复
热议问题