Unable to understand the Plan to explain

Hi gurus

I'm trying to understand some basics of explain plan and get a hard time, I was reading the book tuning performance and incapable of understanding explain plan for the following query:

Example query

EXPLAIN PLAN FOR

SELECT *.

WCP

WHERE THERE IS NOT (SELECT 0

OF THE Department

WHERE dept.dname = 'SALES' AND dept.deptno = emp.deptno)

AND NOT EXISTS (SELECT 0

Bonus OF

WHERE bonus.ename = emp.ename);

-------------------

Select * from table (dbms_xplan.display);

---------------

Output

Hash value of plan: 734347697

-----------------------------------------------------------------------------

| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

-----------------------------------------------------------------------------

|   0 | SELECT STATEMENT |       |     5.   290.     7 (15) | 00:00:01 |

|*  1 |  HASH ANTI JOIN |       |     5.   290.     7 (15) | 00:00:01 |

|*  2 |   HASH ANTI JOIN |       |     5.   255.     5 (20) | 00:00:01 |

|   3.    TABLE ACCESS FULL | EMP |    14.   532.     2 (0) | 00:00:01 |

|*  4 |    TABLE ACCESS FULL | DEPT |     1.    13.     2 (0) | 00:00:01 |

|   5.   TABLE ACCESS FULL | BONUS |     1.     7.     2 (0) | 00:00:01 |

-----------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):

---------------------------------------------------

1 - access("BONUS".") ENAME "=" EMP ". ("' ENAME ')

2 - access("DEPT".") DEPTNO "=" EMP ". ("' DEPTNO ')

4 - filter("DEPT".") DNAME "= 'SALES')

-------------------------

Grateful if someone help out me. Thank you

In addition, I really appreciate if someone proposes a simple tutorial to explain plan. Thanks again

Concerning

Shu

Hi Shuumail,

Here is the tutorial http://allthingsoracle.com/execution-plans-part-1-finding-plans/

Tags: Database

Similar Questions

  • Help to understand the plan of the explain command

    Hello world

    I have a question:

    INSERT INTO ICM_UPSEL_1_ALL

    Select a.customer_no, a.pr_code_bbl, pr_code_pmm, a.score, a.price_diff, a.flag (b.pr_code_pmm) min

    ICM_UPSEL_MIN_PRDIFF_1 a, icm_pre b

    where a.customer_no = b.customer_no

    and a.pr_code_bbl = b.pr_code_bbl

    and a.score = b.score

    and a.flag = b.flag

    and a.price_diff = b.price_diff

    and b.price_diff > 0

    and b.score > = 0.5

    and b.flag = 1

    and b.price_diff > 0 and b.price_diff < = 10

    Group of a.customer_no, a.pr_code_bbl, a.score, a.price_diff, a.flag

    This query runs in a pl/sql procedure.  The plan of the explain for this query command is:

    Hash value of plan: 3124235498

    ------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                           | Lines | Bytes | Cost (% CPU). Time |

    ------------------------------------------------------------------------------------------------------------------

    |   0 | INSERT STATEMENT.                                |     1.   143.     4 (25) | 00:00:01 |

    |   1.  LOAD TABLE CLASSIC | ICM_UPSEL_1_ALL |       |       |            |          |

    |   2.   HASH GROUP BY.                                |     1.   143.     4 (25) | 00:00:01 |

    |   3.    NESTED LOOPS |                                |       |       |            |          |

    |   4.     NESTED LOOPS |                                |     1.   143.     3 (0) | 00:00:01 |

    |*  5 |      TABLE ACCESS BY INDEX ROWID | ICM_UPSEL_MIN_PRDIFF_1 |     1.    65.     1 (0) | 00:00:01 |

    |*  6 |       INDEX RANGE SCAN | MPD_1_FLAG_IDX |     1.       |     1 (0) | 00:00:01 |

    |*  7 |      INDEX RANGE SCAN | ICM_PRE_FLAG_IDX |     1.       |     2 (0) | 00:00:01 |

    |*  8 |     TABLE ACCESS BY INDEX ROWID | ICM_PRE |     1.    78.     2 (0) | 00:00:01 |

    ------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - filter("A".") PRICE_DIFF"> 0 AND 'A '. "SCORE" > = 0.5 AND 'A' "." " (PRICE_DIFF"< = 10)

    6 - access("A".") FLAG "= 1)

    7 - access("B".") FLAG "= 1)

    8 - filter("B".") PRICE_DIFF"< = 10 AND 'B '. "SCORE" > = 0.5 AND 'B' "." " PRICE_DIFF"> 0 AND

    "A"." CUSTOMER_NO '=' B '. "' CUSTOMER_NO ' AND 'A '. "" PR_CODE_BBL "=" B ". "' PR_CODE_BBL ' AND 'A '. "SCORE" = 'B' "." " SCORE '.

    AND 'A '. "" PRICE_DIFF "=" B ". ("' PRICE_DIFF")

    This query runs for 10 hours now and still no results.  Could someone please help me where goes wrong... Why is - it take as long to insert data...

    The number of rows in ICM_UPSEL_MIN_PRDIFF_1: 84 858

    The number of rows in icm_pre: 455,500,944

    All columns are indexed.

    My version of the database is 11.1.0.6 running on windows server 2003 R2.

    Thanks in advance

    This plan seems much more suitable for me: instead of doing > 80 K of the loops of the CBO now decides to make a unique HASH JOIN. I would try to run the operation with the dynamic_sampling flag. If the system statistics are not completely misleading the operation now only takes a few minutes (and no 10: 00 >).

    Concerning

    Martin

  • Not including the filter in the Plan to explain - filter (NULL IS NOT NULL)

    Hi all

    Ask your help to understand the scenario below. (I'm not aware of the details of the request and the table. Just trying to help my friend)

    SQL> conn
    Enter user-name: [email protected]
    Enter password:
    Connected.
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for Linux: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    --Checking the count in PO_LINES
    
    SQL> select count(*) from po_lines;
    
      COUNT(*)
    ----------
             0
    
    
    --PO_LINES is a synonym 
    
    SQL> select object_type,owner from dba_objects where object_name = 'PO_LINES';
    
    OBJECT_TYPE         OWNER
    ------------------- ------------------------------
    SYNONYM             APPS
    
    --The synonym is pointing to PO.PO_LINES_ALL
    
    SQL> select * from user_synonyms where synonym_name = 'PO_LINES';
    
    SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME                     DB_LINK
    ------------------------------ ------------------------------ ------------------------------ ----------
    PO_LINES                       PO                             PO_LINES_ALL
    
    
    --But when counting PO.PO_LINES_ALL I am getting different result
    
    SQL> select count(*) c from po.po_lines_all;
    
             C
    ----------
          8828
    
    --Explain plan of teh original query is 
    
    SQL> explain plan for
      2  select 
      3  * from po_lines;
    
    Explained.
    
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------
    
    ------------------------------------------------------------------------
    | Id  | Operation          | Name         | Rows  | Bytes | Cost (%CPU)|
    ------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |              |     1 |   252 |     0   (0)|
    |*  1 |  FILTER            |              |       |       |            |
    |   2 |   TABLE ACCESS FULL| PO_LINES_ALL |  8796 |  2164K|   106   (4)|
    ------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(NULL IS NOT NULL)
    
    --Now the object PO.PO_LINES_ALL is TABLE, not an mview.
    
    SQL> select object_type,owner from dba_objects where object_name = 'PO_LINES_ALL';
    
    OBJECT_TYPE         OWNER
    ------------------- ------------------------------
    TABLE               PO
    Ask your help in understanding what is happening here.

    Thanks in advance,
    Jac

    Maybe the CAE?

  • Unable to understand the output...

    Hi gurus

    I was reading a little code and unable to understand a single line, can someone guide me to understand this line.

    Code example

    Set serveroutput on

    DECLARE

    n number;

    BEGIN

    n: = 2 * 33.

    dbms_output.put_line (n);

    end;

    Result

    8589934592


    Now, I would like to know how the calculation performed for n: = 2 * 33 in the background so it become 8589934592 result. Thanks in advance.

    One of these curiosities PL/SQL in SQL vs. In PL/SQL * is same as it is built based on POWER. 2 * 33 is identical to POWER (2.33). It is documented in the Precedence of the operators:

    Table 2-3. precedence of operators

    Operator Operation

    **

    Exponentiation

    SY.

  • Unable to understand the code output

    Hi all

    I was reading one of the codes and unable to understand its outcome, I'm really grateful if someone guide me to understand. Thanks in advance.

    Code example

    create or replace package Mp_pkg

    IS

    P_nn TYPE TABLE IS NUMBER

    INDEX BY VARCHAR2 (10);

    END;

    ----------------

    DECLARE

    l_numbers Mp_pkg.p_nn;

    Start

    FOR indx IN 1... 50

    loop

    (indx) l_numbers: = indx;

    END loop;

    dbms_output.put_line (l_numbers. (Last);

    END;

    ----------

    Result

    9

    -----------

    According to my understanding, result should be 50 because the last value of l_number is 50...

    Please guide...


    Hello

    As John said, the VARCHAR2 '9 ' (or any string '9') is longer than the string of 50', for the same reason that the string 'Z' is longer than the string "THE".

    What do we mean when we say this string x is greater than string y?  We mean that

    1. The 1 x chraracter comes after the 1st character of y (in sort order), or, if these characters are equal
    2. x has a 2nd character, but is not, or, if both are more than 1 character
    3. The substring SUBSTR (x, 2) > SUBSTR (y, 2)

    What (if any) strings mean is not serious, so

    • '9' is greater than '50',
    • 'zero' is greater than 'a '.
    • 'small' is greater than 'big '.
    • 'MIN' is greater than 'MAX '.
    • 'yesterday' is greater than 'tomorrow', and
    • "1 January 1900' is superior to" December 31, 2015 ".

    According to rule 1 Correction: rule 3 is the reason why 'MIN' is greater than 'MAX '; the others are all due to rule 1

  • Unable to understand the result of the loop


    Hi all

    I got the tracking code:

    Code

    Set serveroutput ON

    DECLARE
    TYPE IS VARRAY months_array (12) STRING (3 CHAR);
    MONTHS months_array: = months_array ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
    BEGIN
    < < list_month > >
    FOR month number IN REVERSE 6.12
    LOOP
    dbms_output.put_line (' number month = ' | number month |) "Items =' | MONTH (MONTHNO));
    CONTINUE list_month
    WHEN number month < 9;
    END LOOP;
    END;

    Code output

    number months = 12 = Dec

    number month = 11 = Nov

    number months = 10 items = Oct

    number month = 9 elements = Sep

    number month = 8 = August

    number month = 7 cells = Jul

    number months = 6 items = Jun

    My question is if you notice the code condition which is CONTINUE list_month number months WHEN < 9 means loop must be output if number month < 9 and according to code loop starting with number months = 12 so system should display the 1st line of output that is number months = 12 elements = Dec , then exit because the loop exit condition is true that is list_month MORE WHEN number month < 9. Please, help me to understand the output.

    Hi Muzz,

    try something like this

    BEGIN
      FOR monthno IN REVERSE 6..12
      LOOP
        exit when monthno < 9;
        dbms_output.put_line('monthno= '||monthno||' Elements='||MONTH(monthno));
      END LOOP;
    END;
    

    concerning

    Kay

  • Unable to understand the syntax index

    Hello
    I can't understand the meaning of the following syntax to index... and how it works
    CREATE UNIQUE INDEX X_GRS_DMSC_U02 ON Ta_GR_MSC
    (DECODE("GR_TP",'U',NULL,"ON_ID"), DECODE("GR_TP",'U',NULL,"GRS_MSC"))
    Why the syntax above is used... And how does it work?

    Could you please update me as soon as possible...

    It looks like a basic index function. It is designed to ensure that there is a unique combination of the columns 'ON_ID' AND 'GRS_MSC', if the value in the "GR_TP" column is not equal to "U".

    I will try to create the 'TA_GRS_MSC' table and apply the index to illustrate the above as follows:

    SQL> create table ta_gr_msc (gr_tp varchar2(10),on_id varchar2(10), grs_msc varchar2(10));
    
    Table created.
    
    SQL> CREATE UNIQUE INDEX X_GRS_DMSC_U02 ON Ta_GR_MSC
      2  (DECODE("GR_TP",'U',NULL,"ON_ID"), DECODE("GR_TP",'U',NULL,"GRS_MSC"));
    
    Index created.
    
    SQL> insert into ta_gr_msc values ('U','1', '1');
    
    1 row created.
    
    SQL> insert into ta_gr_msc values ('U','1', '1');
    
    1 row created.
    
    SQL> insert into ta_gr_msc values ('X','1','1');
    
    1 row created.
    
    SQL> INSERT INTO TA_GR_MSC VALUES ('X','1','1');
    INSERT INTO TA_GR_MSC VALUES ('X','1','1')
    *
    ERROR at line 1:
    ORA-00001: unique constraint (USER01.X_GRS_DMSC_U02) violated 
    
    SQL> INSERT INTO TA_GR_MSC VALUES ('X','1','2');
    
    1 row created.
    

    As noted above, when the value in the column 'GR_TP' is equivalent to 'U', you can insert any combination of the values in double columns 'ON_ID' and 'GRS_MSC '. However, if the value in the "GR_TP" column is not equal to 'U', you get a unique constraint exception when you try to insert values in double columns 'ON_ID' and 'GRS_MSC '.

    I hope this helps.

  • Tuning SQL - do not understand the plan of the explain command.

    Hi all

    I use 11g R2 and I have 2 questions about the setting of a query.
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    My relevant parameters for the optimizer are:
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- -----------------------
    --
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.3
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    optimizer_use_invisible_indexes      boolean     FALSE
    optimizer_use_pending_statistics     boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE
    The query I want to run is quite simple. It returns a few exceptions with a filter.
     SELECT ERO.DVC_EVT_ID,  E.DVC_EVT_DTTM
     FROM D1_DVC_EVT E,  D1_DVC_EVT_REL_OBJ ERO
     WHERE ERO.MAINT_OBJ_CD = 'D1-DEVICE'
     AND ERO.PK_VALUE1 = :H1
     AND ERO.DVC_EVT_ID = E.DVC_EVT_ID
     AND E.DVC_EVT_TYPE_CD IN ('END-GSMLOWLEVEL-EXCP-SEV-1', 'STR-GSMLOWLEVEL-EXCP-SEV-1')
     ORDER BY E.DVC_EVT_DTTM DESC;
    The execution plan is the following:
    Plan hash value: 3627978539
    
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                            | Name               | Starts | E-Rows |E-Bytes| Cost (%CPU)| Pstart| Pstop | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                     |                    |      1 |        |       |  7131 (100)|       |       |   1181 |00:00:17.17 | 8627 |   2978 |       |       |          |
    |   1 |  SORT ORDER BY                       |                    |      1 |   3137 |   275K|  7131   (1)|       |       |   1181 |00:00:17.17 | 8627 |   2978 | 80896 | 80896 |71680  (0)|
    |   2 |   NESTED LOOPS                       |                    |      1 |        |       |            |       |       |   1181 |00:00:17.16 | 8627 |   2978 |       |       |          |
    |   3 |    NESTED LOOPS                      |                    |      1 |   3137 |   275K|  7130   (1)|       |       |   2058 |00:00:08.09 | 6709 |   1376 |       |       |          |
    |   4 |     TABLE ACCESS BY INDEX ROWID      | D1_DVC_EVT_REL_OBJ |      1 |   3137 |   125K|   845   (1)|       |       |   2058 |00:00:04.37 |  820 |    799 |       |       |          |
    |*  5 |      INDEX RANGE SCAN                | D1T404S0           |      1 |   3137 |       |    42   (0)|       |       |   2058 |00:00:00.08 |   27 |     23 |       |       |          |
    |   6 |     PARTITION RANGE ITERATOR         |                    |   2058 |      1 |       |     1   (0)|   KEY |   KEY |   2058 |00:00:03.69 | 5889 |    577 |       |       |          |
    |*  7 |      INDEX UNIQUE SCAN               | D1T400P0           |   2058 |      1 |       |     1   (0)|   KEY |   KEY |   2058 |00:00:03.66 | 5889 |    577 |       |       |          |
    |*  8 |    TABLE ACCESS BY GLOBAL INDEX ROWID| D1_DVC_EVT         |   2058 |      1 |    49 |     2   (0)| ROWID | ROWID |   1181 |00:00:09.05 | 1918 |   1602 |       |       |          |
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Peeked Binds (identified by position):
    --------------------------------------
    
       1 - (VARCHAR2(30), CSID=178): '271792300706'
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       5 - access("ERO"."PK_VALUE1"=:H1 AND "ERO"."MAINT_OBJ_CD"='D1-DEVICE')
           filter("ERO"."MAINT_OBJ_CD"='D1-DEVICE')
       7 - access("ERO"."DVC_EVT_ID"="E"."DVC_EVT_ID")
       8 - filter(("E"."DVC_EVT_TYPE_CD"='END-GSMLOWLEVEL-EXCP-SEV-1' OR "E"."DVC_EVT_TYPE_CD"='STR-GSMLOWLEVEL-EXCP-SEV-1'))
    So, as you can see, rank 8, I have a TABLE ACCESS BY GLOBAL INDEX ROWID. But what I am failling to see is how Oracle display an ACCESS BY GLOBAL INDEX ROWID TABLE without using any index. As the thought that Oracle has always been a ROWID due to an index.

    I also have an index on the DVC_EVT_TYPE_CD column in my table (line 8 of the predicate information section)

    And finally, what would be your suggestions to improve the performance of this query...

    Thank you very much.

    If I read content (RowSource) statistical information and plan properly, then access the table in step 4 on D1_DVC_EVT_REL_OBJ needs dry 4.37 and accesses 820 buffers. If you had an index D1_DVC_EVT_REL_OBJ (MAINT_OBJ_CD, PK_VALUE1, DVC_EVT_ID) I guess this table access could be avoided. To avoid the access of the table on D1_DVC_EVT an index on D1_DVC_EVT (DVC_EVT_ID, DVC_EVT_TYPE_CD, DVC_EVT_DTTM) should be sufficient.

    I think that these indices would improve the performance of the query, but of course, they would have a negative impact on the performance of DML on the table and they could influence other queries on the table.

  • Unable to understand the original clause


    Hi gurus

    I tried to understand what follows where the clause, but still facing problem to understand that and I really appreciate if someone explain it to me step by step and in detail. Thanks in advance:

    Where Clause

    NOT the CASE (min_age = min_min_age

    OR (min_age - 1, rule_id, status_code)

    IN (SELECT max_age, rule_id, status_code

    OF got_analytics

    )

    )

    Concerning

    Shu

    not ( -- simple
      min_age = min_min_age  -- simple
      or -- simple
      (min_age-1, rule_id, status_cod) in (select max_age,rule_id,status_cod from analytics) -- complex
    )
    

    Description for COMPLEX line

    The triplicate (min_age-1, rule_id, status_code)

    must match one of the Geometry produced by:

      (select
          max_age,rule_id,status_code -- your triplicate
        from analytics)
    

    You'll have to check that my logic, but I think that the 'complex' line can be re-written as a clause EXISTS

    EXISTS ( select null
             from analytics A
             where A.max_age = X.min_age - 1
               and A.rule_id = X.rule_id
               and A.status_code = X.status_code )
    

    MK

  • explain the plan using plan_hash_value and runtime

    Hello

    Please let me know the syntax to get the plan to explain using sql_id and plan_hash_value.

    Also let me know how to find out the same sql execution times in the previous months. I have the ID value of sql.

    Kind regards

    VN

    > Is it possible to check how long the sql finished in the previous months?

    Of AWR / StatsPack reports.

    Or use awrsqrpt.sql which can query the repository for a single SQL_ID AWR.

    However, you must have the AWR data kept for 4 months.  The default retention is 7 days.

    Hemant K Collette

  • Explain the Plan of DBA_HIST_SQL_PLAN

    Hello

    I have the SQL_ID of a poor performing stmt of sql and I need to get the plan to explain the same DBA_HIST_SQL_PLAN.

    Please let me how can know I generate an explain plan of DBA_HIST_SQL_PLAN using sql_id.

    Kind regards

    VN

    That's fine - the service is available in this version.  (I asked because I thought that might be a function g 11 - but I just checked, and it's in 10 gr 2 as well).

    Concerning

    Jonathan Lewis

  • Explain the interpretation of the Plan

    Hi friends!

    I ve an anomaly in time of response of two databases that are equal between the two when I run the same query.

    On the first DB, when I run the query it takes 20 seconds, but on the second DB, the same query at 02:40 minutes.

    This Don t of sense to me, because the first DB contains a lot of data as second DB...

    I ve got the plan to explain both, but I Don t know how to interpret.

    It's the first DB EP, which is the fastest to execute the query (20 "):

    ********************************************************************************************************************************************************************************************

    SELECT STATEMENT CHOOSECost: 4 K bytes: 934 K cardinality: 4 K

    ORDER of 17 SORTING BY cost: 4 K bytes: 934 K cardinality: 4 K

    FILTER 16

    13 LOOPS IMBRIQUEES SEMI cost: 4 K bytes: 934 K cardinality: 4 K

    TABLE 11 ACCESS BY INDEX ROWID IMO. IDDPAR cost: 4 K bytes: 892 K cardinality: 4 K

    BITMAP 10 ROWID CONVERSION

    9 BITMAP AND

    5 BITMAP OR

    2 BITMAP CONVERSION TO ROWID

    1 INDEX RANGE SCAN NON-UNIQUE IMO. IDDPARX10 Cost: 306

    CONVERSION OF BITMAP ROWID 4

    3 INDEX RANGE SCAN NON-UNIQUE IMO. IDDPARX10 Cost: 3

    CONVERSION OF BITMAP TO 8 ROWID

    7 SORT ORDER BY

    6 INDEX RANGE SCAN NON-UNIQUE IMO. IDDPARX3 Cost: 455

    12 INDEX UNIQUE SCAN UNIQUE IMO. PK_IDDPACX1 bytes: 670 K cardinality: 62 K

    TABLE 15 ACCESS BY INDEX ROWID IMO. IDDPARE cost: 1 bytes: cardinality 1: 16

    14 INDEX UNIQUE SCAN UNIQUE IMO. Cardinality of PK_IDDPAREX1: 1

    ********************************************************************************************************************************************************************************************

    And it's the second DB, for the same query of course EP (2'40 "):

    **********************************************************************************************************************************************************

    SELECT STATEMENT CHOOSECost: 6 K bytes: 886 K cardinality: 4 K

    7 FILTER

    4 LOOPS IMBRIQUEES SEMI cost: 6 K bytes: 886 K cardinality: 4 K

    TABLE 2 ACCESS BY INDEX ROWID IMO. IDDPAR cost: 6 K bytes: 850 K cardinality: 4 K

    1 INDEX RANGE SCAN NON-UNIQUE IMO. IDDPARX5 cost: 298 cardinality: 11 K

    UNIQUE 3 INDEX SCAN UNIQUE IMO. PK_IDDPACX1 bytes: 417KO cardinality: 43 K

    TABLE 6 ACCESS BY INDEX ROWID IMO. IDDPARE cost: 1 bytes: cardinality 1: 16

    5 INDEX UNIQUE SCAN UNIQUE IMO. Cardinality of PK_IDDPAREX1: 1

    **********************************************************************************************************************************************************

    As you can see, second EP is as simple, but its effectiveness is much poorer.

    I m intends to interpret my experience with Plans to explain, but it is virtually zero. The most obvious difference I found is the BITMAP CONVERSION OF LINES and CONVERSION of bitmap to LINES Kael'thas appear in the first EP.

    I searched ´ve documentation CONVERSION BITMAP and I ve include, more or less. But I Don t know what measures to take to optimizer are Oracle do the same conversion on the second EP.

    I Don t pretend that someone to teach me everything on explains Plans for interpretation, I m aware of the track of this.

    But would like advice on how I can solve this problem. Any suggestion will be welcome.

    Thanks in advance

    AlexTutor wrote:

    All databases are Enterprise Edition.

    And I ve already tried with advice like that of...

    Okay - so now that you have shown us the request, can you show us EXACTLY what the real "index_combine" referring to the fact that you used looked like and tell us if the execution plan has changed at all with this suspicion.

    Note: Oracle does not ignore the advice, so if your data structures are the same, and you have the right to hint, Oracle would HAVE to give you the plan you want. The only reason why he could not is if the presence of the indication caused Oracle to examine an alternative implementation plan which was (a) cheaper than suggested and (b) a plan which the index was illegal.

    Concerning

    Jonathan Lewis

  • Reg: Explain the Plan-

    Hi Experts,

    I had a doubt about the Plan to explain it.

    Is there a relationship between the cost amount in the Plan to explain and the number of lines read by the query?
    In other words - if the number of lines read by the query increases, which will increase the cost also?

    Can someone please give me some advice on this?


    Thank you and best regards,
    Vanessa B.

    ranitB wrote:
    Hi Experts,

    I had a doubt about the Plan to explain it.

    Is there a relationship between the cost amount in the Plan to explain and the number of lines read by the query?
    In other words - if the number of lines read by the query increases, which will increase the cost also?

    Can someone please give me some advice on this?

    "The answer is 'not really' the cost is single block read disc of research time. But if the number of lines that are expected + coming in overall result are higher, the work expected by Oracle would be also higher. Thus, indirectly, the answer may be Yes. That said, the number of rows contained in the plan of the explain command (you should check the execution plan, explain plan is not the real plan) are the lines that the optimizer is expected to pick up and extracted from the number ofrows real may or may not match with her.

    Aman...

  • Explain the plan of a function?

    Hi people;

    I am running Oracle 11 g 11.2.0.3.
    Is it possible to get the plan of "explaining" execution of a function?

    Thx for your knowledge, looks.

    Hello

    dbms_profiler is really simple, it does not really require a tutorial.

    dbms_profiler.start_profiler;
    
    dbms_profiler.stop_profiler;
    

    That's all. The only thing that can take you a bit is the display of the results
    tables of % plsql_. Google will give you many links to examples, for example this one:

    http://www.toadworld.com/knowledge/KnowledgeXpertforOracle/tabid/648/TopicId/PROF7/default.aspx

    Best regards
    Nikolai

  • Generation to EXPLAIN the PLAN on a database that is open in READ ONLY mode

    Hello

    I use the Oracle 10.2.0.3 version.

    If my database is opened in READ ONLY mode, means that no insert/update/delete operations are allowed here.

    During the generation of the PLAN to EXPLAIN this, the PLAN_TABLE registrations for any SQL. But my database is opened in READ ONLY mode, means that no inserts can happen.

    So, how can I generate EXPLAIN PLAN for my SQL in this State?

    Thanks in advance.



    Best regards
    oratest

    oratest wrote:
    I use the Oracle 10.2.0.3 version.

    If my database is opened in READ ONLY mode, means that no insert/update/delete operations are allowed here.

    During the generation of the PLAN to EXPLAIN this, the PLAN_TABLE registrations for any SQL. But my database is opened in READ ONLY mode, means that no inserts can happen.

    So, how can I generate EXPLAIN PLAN for my SQL in this State?

    You can always do: 'explain the plan in some_table@remote_database' to avoid inclusion in the local database. Unfortunately 10g added an extraction of the sequence of the code "explain plan", and that's where the call fails if you have tried this distant approach on your version.

    Here's an idea that I have not tested. If you configure a link of data to your database from production to the database read-only, you could then do a "explain plan" in the database of production for the SQL statement by changing each object reference in the SQL statement to "object@readonlydatabase". In most cases this will allow the optimizer to recognize the statement as "entirely to distance" and get the optimizer on the readonly database to create the execution plan - which will be then written into the production database.

    Concerning
    Jonathan Lewis

Maybe you are looking for

  • How to change the my@icloud email address?

    While I chose my iCloud email address, I had a typo in, so that my iCloud email address seems funny, which essentially disabled its use. I mean, the e-mail address from iCloud, not email address Apple ID. Does anyone know if there is a way to solve t

  • How to make Garland dell p2715q and p2415q with macbook pro

    I bought 2 Dell montors, the P2715Q and the P2415Q, with DP in and drawers for chaining. I use the mini DP to DP of the cables provided with the monitors. They do not only mirrored between them and the Garland. I can, however, connect the two cables

  • to update flash player

    Despite making the obnoxious message that the flash drive is "obsolete" and download and install Flash, I get always the same message and blocks video from the internet. Thank you RBR

  • E0K41UA #ABA HP ENVY TS m6 Sleekbook brightness does not

    Hello Recently, after a series of updates, my computers brightness controls stopped working. The cursor in the menu of Windows 8 charms have no effect. Any ideas?

  • Retrieve a variable from within a structure of business

    Hello! I am fairly new to the wonderful world of Labview. I started with the reading of most of the tutorials here and found a few basics. However, I simply don't know how to fix my latest: This VI is reading values from the pressure of two different