Why is this query not using my index ?

hey
i have the following situation
(i'm sorry but i can't add the acctual script or output)
create table x as
select      level high_card ,
     mod(level,1000) medium_card ,
     mod(level,10) low_card ,
     '***' padding
from     dual
connect by level < 100001;
create index x_med_low_ix on x(low_card,medium_card);
create index x_high_ix on x(high_card);
exec dbms_stats.gather_table_stats(user,'x',cascade=>true,method_opt=>'for all indexed columns size auto');
i'm running the following query
select      *
from      x
where      low_card = 70
and     medium_card = 70
and     high_card = 70;
i'm expecting a range scan on the x_high_ix index. the optimizer expects only one row. the stats on the high_card columns shows that (num_rows * density = 1).
when i run the query the optimizer uses the x_med_low_ix and does 14 cr.
when i force the use of x_high_ix the cr goes down to 4.
i don't want to declare x_high_ix as unique.
so, why isn't he using my index ?

It's using that index for me:
SQL> create table x as
  2  select level high_card ,
  3  mod(level,1000) medium_card ,
  4  mod(level,10) low_card ,
  5  '***' padding
  6  from dual
  7  connect by level < 100001;
Table created.
SQL>
SQL> create index x_med_low_ix on x(low_card,medium_card);
Index created.
SQL>
SQL> create index x_high_ix on x(high_card);
Index created.
SQL>
SQL> exec dbms_stats.gather_table_stats(user,'x',cascade=>true,method_opt=>'for all indexed columns
size auto');
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
  1   select *
  2   from x
  3   where low_card = 70
  4   and medium_card = 70
  5*  and high_card = 70
SQL>
SQL> /
no rows selected
Execution Plan
Plan hash value: 775193209
| Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |           |     1 |    15 |     2   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS BY INDEX ROWID| X         |     1 |    15 |     2   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN          | X_HIGH_IX |     1 |       |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter("LOW_CARD"=70 AND "MEDIUM_CARD"=70)
   2 - access("HIGH_CARD"=70)
Statistics
          0  recursive calls
          0  db block gets
          3  consistent gets
          0  physical reads
          0  redo size
        454  bytes sent via SQL*Net to client
        370  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          0  rows processed
SQL> set autot off
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Productionwhat is your version?
By the way, when i force optimizer to use index X_MED_LOW_IX, it does 2 CR for me.

Similar Messages

  • Why is this query not using the index?

    check out this query:-
    SELECT CUST_PO_NUMBER, HEADER_ID, ORDER_TYPE, PO_DATE
    FROM TABLE1
    WHERE STATUS = 'N'
    and here's the explain plan:-
    1     
    2     -------------------------------------------------------------------------------------
    3     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    4     -------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 2735K| 140M| 81036 (2)|
    6     |* 1 | TABLE ACCESS FULL| TABLE1 | 2735K| 140M| 81036 (2)|
    7     -------------------------------------------------------------------------------------
    8     
    9     Predicate Information (identified by operation id):
    10     ---------------------------------------------------
    11     
    12     1 - filter("STATUS"='N')
    There is already an index on this column, as is shown below:-
         INDEX_NAME INDEX_TYPE     UNIQUENESS     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION
    1     TABLE1_IDX2 NORMAL     NONUNIQUE     TABLE1      STATUS     1
    2     TABLE1_IDX NORMAL     NONUNIQUE     TABLE1     HEADER_ID     1
    So why is this query not using the index on the 'STATUS' Column?
    I've already tried using optimizer hints and regathering the stats on the table, but the execution plan still remains the same, i.e. it still uses a FTS.
    I have tried this command also:-
    exec dbms_stats.gather_table_stats('GECS','GEPS_CS_SALES_ORDER_HEADER',method_opt=>'for all indexed columns size auto',cascade=>true,degree=>4);
    inspite of this, the query is still using a full table scan.
    The table has around 55 Lakh records, across 60 columns. And because of the FTS, the query is taking a long time to execute. How do i make it use the index?
    Please help.
    Edited by: user10047779 on Mar 16, 2010 6:55 AM

    If the cardinality is really as skewed as that, you may want to look at putting a histogram on the column (sounds like it would be in order, and that you don't have one).
    create table skewed_a_lot
    as
       select
          case when mod(level, 1000) = 0 then 'N' else 'Y' end as Flag,
          level as col1
       from dual connect by level <= 1000000;
    create index skewed_a_lot_i01 on skewed_a_lot (flag);
    exec dbms_stats.gather_table_stats(user, 'SKEWED_A_LOT', cascade => true, method_opt => 'for all indexed columns size auto');Is an example.

  • Can I refactor this query to use an index more efficiently?

    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
            FROM members
            WHERE last_name like 'S%'
            ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?

    xaeryan wrote:
    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
    FROM members
    WHERE last_name like 'S%'
    ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?Come on. Index column order does matter. "LIKE 'x%'" actually is full table scan. The db engine accesses contiguous index entries and then uses the ROWID values in the index to retrieve the table rows.

  • Why my query not using any index but doing a FULL TABLE SCAN

    Hi,
    My EXPLAIN PLAN output is
    Plan hash value: 1163866984                                                                                                                                                                                                                                                                                 
    | Id  | Operation               | Name              | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                                                                                                                                                                       
    |   0 | SELECT STATEMENT        |                   |   774 |   159K|       | 40847   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  1 |  FILTER                 |                   |       |       |       |            |          |                                                                                                                                                                                                       
    |   2 |   SORT GROUP BY         |                   |   774 |   159K|       | 40847   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  3 |    HASH JOIN            |                   | 77337 |    15M|  9744K| 40843   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  4 |     HASH JOIN           |                   | 77337 |  8836K|  5896K| 20987   (2)| 00:04:12 |                                                                                                                                                                                                       
    |*  5 |      HASH JOIN          |                   | 77337 |  4984K|       |  9292   (3)| 00:01:52 |                                                                                                                                                                                                       
    |*  6 |       HASH JOIN         |                   | 24991 |   951K|       |  3349   (3)| 00:00:41 |                                                                                                                                                                                                       
    |*  7 |        TABLE ACCESS FULL| IDS_TXNIDNUMBERS  | 24991 |   683K|       |  2328   (3)| 00:00:28 |                                                                                                                                                                                                       
    |   8 |        TABLE ACCESS FULL| IDS_TXNDEMDATAMAP |  2419K|    25M|       |  1006   (3)| 00:00:13 |                                                                                                                                                                                                       
    |   9 |       TABLE ACCESS FULL | IDS_IDNUMBERS     |  7435K|   191M|       |  5903   (2)| 00:01:11 |                                                                                                                                                                                                       
    |  10 |      TABLE ACCESS FULL  | IDS_DEMDATA       |  2583K|   125M|       |  3683   (5)| 00:00:45 |                                                                                                                                                                                                       
    |  11 |     TABLE ACCESS FULL   | IDS_TXN           |  2583K|   231M|       |  6403   (1)| 00:01:17 |                                                                                                                                                                                                       
    -----------------------------------------------------------------------------------------------------  All my 5 tables IDS_TXNIDNUMBERS, IDS_TXNDEMDATAMAP, IDS_IDNUMBERS,IDS_DEMDATA, IDS_TXN has indexes in relevant columns. Is it cause less time so CBO is not using the indexes.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Please be polite when responding to my queries. If you find these questions not to your standard, stay away from them. This is an open forum and I have got my full rights to ask questions.Unsure, what wrong did you find in SB's reply. I find those links perfectly knowledgeable. The question of having so many unanswered questions probably pricked you a little too much. But that, IMO, is a legitimate question, to be asked to a User who even after being associated with OTN for over an year has 100% record of not getting an answer.
    For your original question, you will have to provide more details to allow people to answer you.
    You must read {message:id=3292438} and post the mentioned details. People do not carry a Crystal Ball to identify the problem merely by reading few lines of Problem description and Explain plans. Do not make people guess, provide appropriate details, to help them Help "You".

  • SQL Query not using Composite Index

    Hi,
    Please look at the below query:
    SELECT pde.participant_uid
    ,pde.award_code
    ,pde.award_type
    ,SUM(decode(pde.distribution_type
    ,'FORFEITURE'
    ,pde.forfeited_quantity *
    pde.sold_price * cc.rate
    ,pde.distributed_quantity *
    pde.sold_price * cc.rate)) AS gross_Amt_pref_Curr
    FROM part_distribution_exec pde
    ,currency_conversion cc
    ,currency off_curr
    WHERE pde.participant_uid = 4105
    AND off_curr.currency_iso_code =
    pde.offering_currency_iso_code
    AND cc.from_currency_uid = off_curr.currency_uid
    AND cc.to_currency_uid = 1
    AND cc.latest_flag = 'Y'
    GROUP BY pde.participant_uid
    ,pde.award_code
    ,pde.award_type
    In oracle 9i, i"ve executed this above query, it takes 6 seconds and the cost is 616, this is due to non usage of the composite index, Currency_conversion_idx(From_currency_uid, To_currency_uid, Latest_flag). I wonder why this index is not used while executing the above query. So, I've dropped the index and recreated it. Now, the query is using this index. After inserting many rows or say in 1 days time, if the same query is executed, again the query is not using the index. So everyday, the index should be dropped and recreated.
    I don't want this drop and recreation of index daily, I need a permanent solution for this.
    Can anyone tell me, Why this index goes stale after a period of time???? Please take some time and Solve this issue.
    -Sankar

    Hi David,
    This is Sankar here. Thankyou for your reply.
    I've got the plan table output for this problematic query, please go thro' it and help me out why the index CURRENCY_CONVERSION_IDX is used now and why it's not using while executing the query after a day or inserting some records...
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 26 | 15678 | 147 |
    | 1 | TABLE ACCESS BY INDEX ROWID | PART_AWARD_PAYOUT_SCHEDULE | 1 | 89 | 2 |
    |* 2 | INDEX UNIQUE SCAN | PART_AWARD_PAYOUT_SCHEDULE_PK1 | 61097 | | 1 |
    | 3 | SORT AGGREGATE | | 1 | 67 | |
    |* 4 | FILTER | | | | |
    |* 5 | INDEX RANGE SCAN | PART_AWARD_PAYOUT_SCHEDULE_PK1 | 1 | 67 | 2 |
    | 6 | SORT AGGREGATE | | 1 | 94 | |
    |* 7 | FILTER | | | | |
    |* 8 | TABLE ACCESS BY INDEX ROWID | PART_AWARD_PAYOUT_SCHEDULE | 1 | 94 | 3 |
    |* 9 | INDEX RANGE SCAN | PART_AWARD_PAYOUT_SCHEDULE_PK1 | 1 | | 2 |
    |* 10 | FILTER | | | | |
    |* 11 | HASH JOIN | | 26 | 15678 | 95 |
    |* 12 | HASH JOIN OUTER | | 26 | 11596 | 91 |
    |* 13 | HASH JOIN | | 26 | 10218 | 86 |
    | 14 | VIEW | | 1 | 82 | 4 |
    | 15 | SORT GROUP BY | | 1 | 116 | 4 |
    |* 16 | TABLE ACCESS BY INDEX ROWID | PART_AWARD_LEDGER | 1 | 116 | 2 |
    |* 17 | INDEX RANGE SCAN | PARTICIPANT_UID_IDX | 1 | | 1 |
    |* 18 | HASH JOIN OUTER | | 26 | 8086 | 82 |
    |* 19 | HASH JOIN | | 26 | 6006 | 71 |
    | 20 | NESTED LOOPS | | 36 | 5904 | 66 |
    | 21 | NESTED LOOPS | | 1 | 115 | 65 |
    | 22 | TABLE ACCESS BY INDEX ROWID | CURRENCY_CONVERSION | 18 | 756 | 2 |
    |* 23 | INDEX RANGE SCAN | KLS_IDX_CURRENCY_CONV | 3 | | 1 |
    | 24 | VIEW | | 1 | 73 | 4 |
    | 25 | SORT GROUP BY | | 1 | 71 | 4 |
    | 26 | TABLE ACCESS BY INDEX ROWID| PART_AWARD_VALUE | 1 | 71 | 2 |
    |* 27 | INDEX RANGE SCAN | PAV_PARTICIPANT_UID_IDX | 1 | | 1 |
    | 28 | TABLE ACCESS BY INDEX ROWID | PARTICIPANT_AWARD | 199 | 9751 | 1 |
    |* 29 | INDEX UNIQUE SCAN | PARTICIPANT_AWARD_PK1 | 100 | | |
    |* 30 | INDEX FAST FULL SCAN | PARTICIPANT_AWARD_TYPE_PK1 | 147 | 9849 | 4 |
    | 31 | VIEW | | 1 | 80 | 10 |
    | 32 | SORT GROUP BY | | 1 | 198 | 10 |
    |* 33 | TABLE ACCESS BY INDEX ROWID | CURRENCY_CONVERSION | 1 | 42 | 2 |
    | 34 | NESTED LOOPS | | 1 | 198 | 8 |
    | 35 | NESTED LOOPS | | 2 | 312 | 4 |
    | 36 | TABLE ACCESS BY INDEX ROWID| PART_DISTRIBUTION_EXEC | 2 | 276 | 2 |
    |* 37 | INDEX RANGE SCAN | IND_PARTICIPANT_UID | 1 | | 1 |
    | 38 | TABLE ACCESS BY INDEX ROWID| CURRENCY | 1 | 18 | 1 |
    |* 39 | INDEX UNIQUE SCAN | CURRENCY_AK | 1 | | |
    |* 40 | INDEX RANGE SCAN | CURRENCY_CONVERSION_AK | 2 | | 1 |
    | 41 | VIEW | | 1 | 53 | 4 |
    | 42 | SORT GROUP BY | | 1 | 62 | 4 |
    |* 43 | TABLE ACCESS BY INDEX ROWID | PART_AWARD_VESTING | 1 | 62 | 2 |
    |* 44 | INDEX RANGE SCAN | PAVES_PARTICIPANT_UID_IDX | 1 | | 1 |
    | 45 | TABLE ACCESS FULL | AWARD | 1062 | 162K| 3 |
    | 46 | TABLE ACCESS BY INDEX ROWID | CURRENCY | 1 | 18 | 2 |
    |* 47 | INDEX UNIQUE SCAN | CURRENCY_AK | 102 | | 1 |
    Predicate Information (identified by operation id):
    2 - access("PAPS"."AWARD_CODE"=:B1 AND "PAPS"."PARTICIPANT_UID"=4105 AND "PAPS"."AWARD_TYPE"=:B2
    "PAPS"."INSTALLMENT_NUM"=1)
    4 - filter(4105=:B1)
    5 - access("PAPS"."AWARD_CODE"=:B1 AND "PAPS"."PARTICIPANT_UID"=4105 AND "PAPS"."AWARD_TYPE"=:B2)
    7 - filter(4105=:B1)
    8 - filter("PAPS"."STATUS"='OPEN')
    9 - access("PAPS"."AWARD_CODE"=:B1 AND "PAPS"."PARTICIPANT_UID"=4105 AND "PAPS"."AWARD_TYPE"=:B2)
    10 - filter("CC_A_P_CURR"."FROM_CURRENCY_UID"= (SELECT /*+ */ "CURRENCY"."CURRENCY_UID" FROM
    "EWAPDBO"."CURRENCY" "CURRENCY" WHERE "CURRENCY"."CURRENCY_ISO_CODE"=:B1))
    11 - access("SYS_ALIAS_7"."AWARD_CODE"="A"."AWARD_CODE")
    12 - access("SYS_ALIAS_7"."AWARD_CODE"="PVS"."AWARD_CODE"(+))
    13 - access("SYS_ALIAS_8"."AWARD_CODE"="PALS"."AWARD_CODE" AND
    "SYS_ALIAS_8"."AWARD_TYPE"="PALS"."AWARD_TYPE")
    16 - filter(TRUNC("PAL1"."LEDGER_ENTRY_DATE")<=TRUNC(SYSDATE@!) AND "PAL1"."ALLOC_TYPE"='IPU')
    17 - access("PAL1"."PARTICIPANT_UID"=4105)
    filter("PAL1"."PARTICIPANT_UID"=4105)
    18 - access("SYS_ALIAS_8"."AWARD_CODE"="PDES"."AWARD_CODE"(+) AND
    "SYS_ALIAS_8"."AWARD_TYPE"="PDES"."AWARD_TYPE"(+))
    19 - access("SYS_ALIAS_7"."AWARD_CODE"="SYS_ALIAS_8"."AWARD_CODE")
    23 - access("CC_A_P_CURR"."TO_CURRENCY_UID"=1 AND "CC_A_P_CURR"."LATEST_FLAG"='Y')
    27 - access("PAV"."PARTICIPANT_UID"=4105)
    filter("PAV"."PARTICIPANT_UID"=4105)
    29 - access("SYS_ALIAS_7"."AWARD_CODE"="SYS_ALIAS_9"."AWARD_CODE" AND
    "SYS_ALIAS_7"."PARTICIPANT_UID"=4105)
    30 - filter("SYS_ALIAS_8"."PARTICIPANT_UID"=4105)
    33 - filter("CC"."LATEST_FLAG"='Y')
    37 - access("PDE"."PARTICIPANT_UID"=4105)
    filter("PDE"."PARTICIPANT_UID"=4105)
    39 - access("OFF_CURR"."CURRENCY_ISO_CODE"="PDE"."OFFERING_CURRENCY_ISO_CODE")
    40 - access("CC"."FROM_CURRENCY_UID"="OFF_CURR"."CURRENCY_UID" AND "CC"."TO_CURRENCY_UID"=1)
    43 - filter("PV"."VESTING_DATE"<=SYSDATE@!)
    44 - access("PV"."PARTICIPANT_UID"=4105)
    filter("PV"."PARTICIPANT_UID"=4105)
    47 - access("CURRENCY"."CURRENCY_ISO_CODE"=:B1)
    Note: cpu costing is off
    93 rows selected.
    Please help me out...
    -Sankar

  • Query not using the index

    Query
    SELECT case.case_objid FROM [email protected] case, table_x_cwp_tickect_details_vw t WHERE CASE.case_condition_cd IN ('OPEN', 'OPEN-DISPATCH', 'OPEN-REJECT', 'OPEN-RETURNED') AND case.case_type_cd in ('CUSTOMER FAULT', 'CHRONIC','SCHEDULED ACTIVITY','PROBLEM') AND ROWNUM <= 500 AND case.case_objid = t.ticket_objid AND ( ( case.account_id = '672286' ) ) ORDER BY case.case_id DESC
    From PROD
    Plan
    SELECT STATEMENT HINT: FIRST_ROWS Cost: 2,629 Bytes: 221,500 Cardinality: 500
         37 SORT ORDER BY Cost: 2,629 Bytes: 221,500 Cardinality: 500
              36 COUNT STOPKEY
                   35 NESTED LOOPS OUTER Cost: 2,628 Bytes: 279,533 Cardinality: 631
                        33 HASH JOIN OUTER Cost: 2,627 Bytes: 275,116 Cardinality: 631
                             31 NESTED LOOPS OUTER Cost: 2,249 Bytes: 266,282 Cardinality: 631
                                  28 NESTED LOOPS Cost: 1,766 Bytes: 257,448 Cardinality: 631
                                       26 NESTED LOOPS Cost: 1,765 Bytes: 253,031 Cardinality: 631
                                            24 NESTED LOOPS Cost: 1,764 Bytes: 248,614 Cardinality: 631
                                                 22 NESTED LOOPS Cost: 1,763 Bytes: 244,197 Cardinality: 631
                                                      19 NESTED LOOPS Cost: 1,258 Bytes: 235,363 Cardinality: 631
                                                           17 NESTED LOOPS Cost: 1,257 Bytes: 230,946 Cardinality: 631
                                                                14 NESTED LOOPS OUTER Cost: 752 Bytes: 217,695 Cardinality: 631
                                                                     12 HASH JOIN Cost: 751 Bytes: 213,278 Cardinality: 631
                                                                          1 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,052 Cardinality: 1,436
                                                                          11 HASH JOIN Cost: 748 Bytes: 208,861 Cardinality: 631
                                                                               2 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,052 Cardinality: 1,436
                                                                               10 HASH JOIN Cost: 746 Bytes: 204,444 Cardinality: 631
                                                                                    3 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,052 Cardinality: 1,436
                                                                                    9 HASH JOIN Cost: 743 Bytes: 200,027 Cardinality: 631
                                                                                         4 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,052 Cardinality: 1,436
                                                                                         8 NESTED LOOPS Cost: 741 Bytes: 195,610 Cardinality: 631
                                                                                              5 REMOTE REMOTE CASE Cost: 235 Bytes: 156,488 Cardinality: 631
                                                                                              7 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_CASE Cost: 1 Bytes: 62 Cardinality: 1
                                                                                                   6 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.TC_C_CASE_OBJINDEX Cost: 1 Cardinality: 1
                                                                     13 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.UN_PTT2CASE Cost: 1 Bytes: 7 Cardinality: 1
                                                                16 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_SITE Cost: 1 Bytes: 21 Cardinality: 1
                                                                     15 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.SITE_OBJINDEX Cost: 1 Cardinality: 1
                                                           18 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.BUS_ORG_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                                      21 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_ADDRESS Cost: 1 Bytes: 14 Cardinality: 1
                                                           20 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.ADDRESS_OBJINDEX Cost: 1 Cardinality: 1
                                                 23 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.COUNTRY_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                            25 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.CONTACT_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                       27 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.CONDITION_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                  30 TABLE ACCESS BY GLOBAL INDEX ROWID TABLE SA.TABLE_SITE_PART Cost: 1 Bytes: 14 Cardinality: 1 Partition #: 34
                                       29 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.SITE_PART_OBJINDEX Cost: 1 Cardinality: 1
                             bold 32 TABLE ACCESS FULL TABLE SA.TABLE_MOD_LEVEL Cost: 376 Bytes: 1,442,084 Cardinality: 103,006 bold
                        34 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.PART_NUM_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
    From DEV platform
    Plan
    SELECT STATEMENT HINT: FIRST_ROWS Cost: 591 Bytes: 61,134 Cardinality: 138
         37 SORT ORDER BY Cost: 591 Bytes: 61,134 Cardinality: 138
              36 COUNT STOPKEY
                   35 HASH JOIN Cost: 590 Bytes: 61,134 Cardinality: 138
                        1 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,045 Cardinality: 1,435
                        34 HASH JOIN Cost: 588 Bytes: 60,168 Cardinality: 138
                             2 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,045 Cardinality: 1,435
                             33 HASH JOIN Cost: 585 Bytes: 59,202 Cardinality: 138
                                  3 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,045 Cardinality: 1,435
                                  32 HASH JOIN Cost: 583 Bytes: 58,236 Cardinality: 138
                                       4 INDEX FAST FULL SCAN INDEX (UNIQUE) SA.GBST_ELM_OBJINDEX Cost: 2 Bytes: 10,045 Cardinality: 1,435
                                       31 NESTED LOOPS OUTER Cost: 580 Bytes: 57,270 Cardinality: 138
                                            29 NESTED LOOPS OUTER Cost: 579 Bytes: 56,304 Cardinality: 138
                                                 27 NESTED LOOPS OUTER Cost: 469 Bytes: 54,372 Cardinality: 138
                                                      24 NESTED LOOPS Cost: 363 Bytes: 52,440 Cardinality: 138
                                                           22 NESTED LOOPS Cost: 362 Bytes: 51,474 Cardinality: 138
                                                                20 NESTED LOOPS Cost: 361 Bytes: 50,508 Cardinality: 138
                                                                     18 NESTED LOOPS Cost: 360 Bytes: 49,542 Cardinality: 138
                                                                          15 NESTED LOOPS Cost: 249 Bytes: 47,610 Cardinality: 138
                                                                               13 NESTED LOOPS Cost: 248 Bytes: 46,644 Cardinality: 138
                                                                                    10 NESTED LOOPS OUTER Cost: 138 Bytes: 43,746 Cardinality: 138
                                                                                         8 NESTED LOOPS Cost: 137 Bytes: 42,780 Cardinality: 138
                                                                                              5 REMOTE REMOTE CASE Cost: 26 Bytes: 34,224 Cardinality: 138
                                                                                              7 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_CASE Cost: 1 Bytes: 62 Cardinality: 1
                                                                                                   6 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.TC_C_CASE_OBJINDEX Cost: 1 Cardinality: 1
                                                                                         9 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.UN_PTT2CASE Cost: 1 Bytes: 7 Cardinality: 1
                                                                                    12 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_SITE Cost: 1 Bytes: 21 Cardinality: 1
                                                                                         11 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.SITE_OBJINDEX Cost: 1 Cardinality: 1
                                                                               14 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.BUS_ORG_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                                                          17 TABLE ACCESS BY INDEX ROWID TABLE SA.TABLE_ADDRESS Cost: 1 Bytes: 14 Cardinality: 1
                                                                               16 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.ADDRESS_OBJINDEX Cost: 1 Cardinality: 1
                                                                     19 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.COUNTRY_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                                                21 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.CONTACT_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                                           23 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.CONDITION_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
                                                      26 TABLE ACCESS BY GLOBAL INDEX ROWID TABLE SA.TABLE_SITE_PART Cost: 1 Bytes: 14 Cardinality: 1 Partition #: 34
                                                           25 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.SITE_PART_OBJINDEX Cost: 1 Cardinality: 1
                                       bold           28 INDEX RANGE SCAN INDEX SA.IND_PART_INFO2PART_NUM Cost: 1 Bytes: 14 Cardinality: 1 bold
                                            30 INDEX UNIQUE SCAN INDEX (UNIQUE) SA.PART_NUM_OBJINDEX Cost: 1 Bytes: 7 Cardinality: 1
    Conclusion:
    IND_PART_INFO2PART_NUM is not in use in Production environment
    PROD
    1. SQL> select index_name,NUM_ROWS,CLUSTERING_FACTOR from dba_indexes where index_name='IND_PART_INFO2PART_NUM';
    INDEX_NAME NUM_ROWS CLUSTERING_FACTOR
    IND_PART_INFO2PART_NUM 103023 46488
    DEV environment
    SQL> select index_name,NUM_ROWS,CLUSTERING_FACTOR,table_name from dba_indexes where index_name='IND_PART_INFO2PART_NUM';
    INDEX_NAME NUM_ROWS CLUSTERING_FACTOR TABLE_NAME
    IND_PART_INFO2PART_NUM 101982 45722 TABLE_MOD_LEVEL
    1. Index is rebuild
    2. stats are up to date
    3. Redef on table is done.
    Still no change in the plan .

    Osama-mustafa wrote:
    Aman.... wrote:
    Osama-mustafa wrote:
    alter index <index-name> rebuild ;Why?
    Aman....I faced this issue with query and indexes was need rebuildWhat issue Osama-that query wasn't using index and after rebuild it did start using it? Not just that this reply is wrong , this is OP has mentioned that he has done already. Please note that index rebuild is not the answer when the query is not using the index. There can be many reasons behind it. Have a look at Richard Foote's blog where he explains all of this in a very detailed way and in many posts.
    Aman....

  • Why is my SQL not using an index?

    I have a small SQL query (10g) where I join to basic table together on a customer_id column.
    select *
    from customer c
    inner join work_item sp1 ON sp1.customer_id = c.customer_id
    and I am using TOAD, which tells me (in the Explain Plan area), that I'm doing a "TABLE ACCESS FULL" scan on the customer table.
    But when I look at the details of BOTH tables, I can clearly see that they both have an index on the customer field, and they are both the same data types...
    The interesting thing, is that if I change the query to only select data from the work_item table,
    select sp1.*
    from customer c
    inner join work_item sp1 ON sp1.customer_id = c.customer_id
    I can see that the indexes are being used...
    Why is this? I must be able to select certain columns from the customer table, but why would it not use an index when I do?
    Thanks!

    If I understand correctly, below is a simple test case.
    I created a small table and indexed "object_id" column.
    When I issue "Select * from t" optimizer goes with FULL TABLE SCAN, whereas wehn "select OBJECT_ID from t" is issued, optimizer chooses to read from the index instead of accessing the table. This is because FAST FULL SCAN is far cheaper than a FTS in this case.
    SQL> create table t as select object_id, object_name from all_objects;
    Table created.
    SQL> exec dbms_stats.gather_table_stats(user, 't');
    PL/SQL procedure successfully completed.
    SQL> create index t_idx1 on t(object_id);
    Index created.
    SQL> set autotrace traceonly exp
    SQL> select * from t;
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      | 37932 |  1074K|    55   (2)| 00:00:01 |
    | 1 | TABLE ACCESS FULL| T | 37932 | 1074K| 55 (2)| 00:00:01 |
    SQL> select object_id from t;
    Execution Plan
    Plan hash value: 3958994525
    | Id  | Operation            | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |        | 37932 |   185K|    25   (0)| 00:00:01 |
    | 1 | INDEX FAST FULL SCAN| T_IDX1 | 37932 | 185K| 25 (0)| 00:00:01 |
    SQL>

  • Why my select is not using the index

    This is my index
    CREATE INDEX CONFIG_STATE_IDX ON IDENTIFIER
    (CONFIGURATION_ID, STATE)
    LOGGING
    TABLESPACE NII_INDEX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    This is my select statement:
    SELECT *
    FROM identifier i
    WHERE
         i.configuration_id = '89afead40a0c0b8d00628c59aa405ea4'
         AND i.state = 'QT'
    AND ROWNUM <6
    This is my exmplain plan result
    Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE          5           2128                     
    COUNT STOPKEY                                        
    TABLE ACCESS FULL     IDENTIFIER     133 K     19 M     2128                     
    Why it is not using the index on configuration_id and state.

    Possibility one: you didn't do an analyze statistics on the table and/or the index after index creation.
    Possibility two: The optimizer has determined that it can return the query result set with fewer I/Os if it does a FTS vs using the index (the optimizer is very keen on I/Os).

  • Spatial Query not using Spatial Index

    Hi All,
    I have a query which uses the SDO_WITHIN_DISTANCE operator, but is taking far too long to complete.
    SELECT
                   RT.*,RD.RPD_NODE_ID, RD.RPD_XCOORD,RD.RPD_YCOORD
              FROM
                   railplan_data RD
                   LEFT JOIN Walk_data_sets WDS ON RD.RPD_RPS_ID = WDS.WDS_RPS_ID
                   LEFT JOIN RWNet_Temp RT ON WDS.WDS_ID = RT.RW_WDS_ID
              WHERE
                   WDS.wds_id = 441
              AND
                   MDSYS.SDO_WITHIN_DISTANCE(RT.RW_GEOM,RD.RPD_GEOLOC,'DISTANCE=' || TO_CHAR(RT.RW_BUFFER) || ' UNIT=METER') = 'TRUE';
    Upon generation of the explain plan I have realised that the spatial index is not being used in the query, but I can't for the life of me get the thing working
    3     | Id | Operation | Name | Rows | Bytes |TempSpc| Cost |
    4     ------------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 25841 | 99M| | 201 |
    6     |* 1 | FILTER | | | | | |
    7     | 2 | MERGE JOIN OUTER | | | | | |
    8     |* 3 | HASH JOIN | | 12652 | 420K| 2968K| 185 |
    9     | 4 | TABLE ACCESS FULL | RAILPLAN_DATA | 75910 | 2075K| | 60 |
    10     | 5 | TABLE ACCESS BY INDEX ROWID| WALK_DATA_SETS | 1 | 6 | | 1 |
    11     |* 6 | INDEX UNIQUE SCAN | WDS_PK | 1 | | | |
    12     |* 7 | SORT JOIN | | 16 | 63760 | | 16 |
    13     |* 8 | TABLE ACCESS FULL | RWNET_TEMP | 16 | 63760 | | 4 |
    If anyone could help me out in figuring out why the spatial index is not being used, I would be most appreciative.
    TIA
    Dan

    Hi all again,
    Well I finally got an upgrade to Oracle 10 (yay!), so I am now trying to implement the SDO_JOIN method as per my earlier posts. In fact it is actually working, but I have a question. When I run an explain plan it does not show the use of any domain indexes which I would expect to see, but performs fine (1.07s) with just a few records (10 in 1 table, 15000 in the other), please see code and explain plan below:
    SELECT
      Distinct
        RT.RW_ID, RD.RPD_NODE_ID,
        RD.RPD_XCOORD,RD.RPD_YCOORD
    FROM
        RPD_TEMP_762 RD,
        WALK_DATA_SETS WDS,
        RWNET_TEMP RT,
        TABLE
        (SDO_JOIN
            (  'RWNET_TEMP',
                'RW_GEOM',
                'RPD_TEMP_762',
                'RPD_GEOLOC',
                'distance= ' || TO_CHAR(RT.RW_BUFFER) || ' unit=meter')) SPATIAL_JOIN_RESULT
    WHERE WDS.WDS_ID = RT.RW_WDS_ID
    AND WDS.WDS_ID = 762
    AND SPATIAL_JOIN_RESULT.ROWID1 = RT.ROWID
    AND SPATIAL_JOIN_RESULT.ROWID2 = RD.ROWID
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                                                                           
    | Id  | Operation                            | Name         | Rows  | Bytes | Cost (%CPU)|                                                                                                                                                                                                                  
    |   0 | SELECT STATEMENT                     |              |    74 |  5994 | 21753   (1)|                                                                                                                                                                                                                  
    |   1 |  SORT UNIQUE                         |              |    74 |  5994 | 21691   (1)|                                                                                                                                                                                                                  
    |*  2 |   HASH JOIN                          |              |  1046K|    80M|  1859   (1)|                                                                                                                                                                                                                  
    |   3 |    NESTED LOOPS                      |              |  6076 |   213K|  1824   (1)|                                                                                                                                                                                                                  
    |   4 |     NESTED LOOPS                     |              |    74 |  2516 |   194   (1)|                                                                                                                                                                                                                  
    |*  5 |      INDEX UNIQUE SCAN               | WDS_PK       |     1 |     4 |     0   (0)|                                                                                                                                                                                                                  
    |*  6 |      TABLE ACCESS FULL               | RWNET_TEMP   |    74 |  2220 |   194   (1)|                                                                                                                                                                                                                  
    |*  7 |     COLLECTION ITERATOR PICKLER FETCH| SDO_JOIN     |       |       |            |                                                                                                                                                                                                                  
    |   8 |    TABLE ACCESS FULL                 | RPD_TEMP_762 | 17221 |   756K|    28   (0)|                                                                                                                                                                                                                  
    ------------------------------------------------------------------------------------------  When i try to add hints to force the use of spatial indexes the performance of this query drops through the floor (it takes minutes / hours), index hint shown below:
    /*+ ORDERED INDEX(RW rw_geom) INDEX(RD rpd_geoloc) */My question is is the first query using domain indexes, and if not, how do I get it to?
    TIA
    Dan

  • After BI Stats installation: Why is this query not reporting on my query?

    Hi,
    ok, so I thought I was done with BI Stats installation and I run a query:
    Detailed Query Runtime Statistics: Analysis 0TCT_MC02_Q0200 0TCT_MC02
    which came with the installation.
    I see query QueryColleague in this query with the information:
    Time       = 21.992
    Time:Ste =29.480
    Counter  = 0
    1.
    What is the significance of these 3 figures (Time, Time:Ste, Counter)? Does it in any way give a sense of the performance of the query?
    2.
    Under the “Settings for BI Statistics” I verified and QueryColleague was set as:
    Statistics = D
    OLAP detail level = (blank)
    I have a query QueryMyOwn which following the installation guidelines, I set up as:
    Statistics = X
    OLAP detail level = 2
    I have since run QueryMyOwn a and run the delta process chains again but this query still not does appear in this “Detailed Query Runtime Statistics”. Any idea what may be going on?
    3.
    Am I misinterpreting this report? I thought it was going to show a list of queries which BS Stats has collected data and reporting on them.
    4.
    Which of the many queries which come with the BI Stats have you found useful so far? I will appreciate the reason. Any particular one standing out if you need to track why a particular report may not be performing well?
    Thanks

    Hi,
      I think you are viewing the queries from Admin cockpit 0TCT_MC02_Q0200 which has filter to display the query that had been executed  in last 24 hours.
    Most of the queries from Admin Cockpit will be help you to monitor the data load stats, which load taken long time to complete including the process chains, DTP etc. There are some other queries with have conditional / Expection which filter the data based on top 10 process etc.
    Few Queries that was useful to me are
    0TCT_MC22_Q0104 - Long term trends in total runtime
    0TCT_MC12_Q0110 - Process status
    0TCT_MC01_Q0122 - Deviation in runtime of BI Application Object
    Hope it helps,
    Cheers,
    Balaji

  • Why does it not use the index?

    L.S.,
    We are using a table called IT_RFC_REGISTRATION. It is a relatively big table for our application.
    Its primary key is RFCNR, each new RFCNR getting the next value.
    Now for my intranet report I am interested in the last 40 records. But when I execute:
    SELECT *
    FROM IT_RFC_REGISTRATION
    ORDER BY RFCNR DESC
    the query takes ages to execute.
    When I do this:
    SELECT RFCNR
    FROM IT_RFC_REGISTRATION
    ORDER BY RFCNR DESC
    the result comes instantaneous because this query uses the index on RFCNR.
    Why does the former query not use the index to execute? It should be much faster to fetch ROWIDs from the index end to start and use those to get the records, than to load all the records and then sort them.
    Is there a trick with which I can use a join of the latter query and the former query to speed up the result?
    Greetings,
    Philbert de Zwart,
    Utrecht, The Netherlands.

    The difference you see in query run time is based on the amount data being sorted, then returned. In the first query, a full table scan is faster since if the index was used, Oracle would have to do a lookup in the index, get the rowid's and go look up the data in the table (TWO disk i/o's). It's faster to just scan the entire table.
    Indexes will generally not be used unless you have a where clause. If you only need a few fields from the table, you could include them all in an index. For instance, if you only need RFCNR & DESC create a concatenated index on those two columns and then only a scan of the index is required (very fast).

  • Why is Oracle not using the index??

    Hi,
    I have a table called 'arc_errors' which has an index on 'member_number' as follows:- Create/Recreate indexes
    create index DWO.DW_ARC_CERRORS_MNO on DWO.DW_ARC_CERRORS (MEMBER_NUMBER);
    But surpisingly, when I execute the following query, it does not use the index.
    SELECT member_number,
    COUNT(*) error_count
    FROM arc_errors a
    WHERE member_number = 68534152 AND
    ( tx_type = 'SDIC' AND
    error_number IN (4, 7, 12, 13, 15, 17, 18, 705) )
    OR
    ( tx_type = 'AUTH' AND
    error_number IN (100, 104, 107, 111, 116) )
    OR
    ( tx_type = 'BHO' AND
    error_number IN (708,710) )
    OR
    ( tx_type = 'XLGN' AND
    ( error_number BETWEEN 102 AND 105 OR
    error_number BETWEEN 107 AND 120 OR
    error_number BETWEEN 300 AND 304 ) )
    OR
    ( tx_type = 'None' AND
    ( error_number IN (20, 112) OR
    error_number BETWEEN 402 AND 421 ) )
    OR
    ( tx_type = 'HYBR' AND
    error_number IN (303, 304) )
    GROUP BY member_number;
    This is what 'explain plan' tell me
    SELECT STATEMENT, GOAL = RULE               237907     502923     15087690     
    SORT GROUP BY               237907     502923     15087690     
    PARTITION RANGE ALL                              
    TABLE ACCESS FULL     DWO     DW_ARC_CERRORS     237209     502923     15087690     
    Can someone tell me why a 'table acess full' is required here?
    Thanks in advance,
    Rajesh

    Sorry, I just found the solution myself. I need to put an extra pair of braces around the set of conditions seperated by OR.

  • Query not using indexes

    select *
              from hrm_career x
              WHERE x.begin_date = ( SELECT MAX(begin_date)
                             FROM hrm_career y
                             WHERE y.employee_id = x.employee_id AND
                                  begin_date <= SYSDATE AND
                                  primary_job = 'Y') AND
                   x.primary_job = 'Y'
    I have the above query which is not using the index created on the BEGIN_DT column
    I tried to force using still not using
    but when i apply a value say
    select *
              from hrm_career x
              WHERE x.begin_date ='10-20-2007'
    It is using index and resulting in very fast response
    Can some throw some ideas on it...
    Where should i look into here ..

    SQL> set autotrace traceonly
    SQL> select *
    2 from hrm_career x
    3 WHERE x.begin_date = ( SELECT MAX(begin_date)
    4 FROM hrm_career y
    5 WHERE y.employee_id = x.employee_id AND
    6 begin_date <= SYSDATE AND
    7 primary_job = 'Y') AND
    8 x.primary_job = 'Y';
    13454 rows selected.
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1417 Card=152 Bytes=
    35568)
    1 0 FILTER
    2 1 SORT (GROUP BY) (Cost=1417 Card=152 Bytes=35568)
    3 2 HASH JOIN (Cost=254 Card=47127 Bytes=11027718)
    4 3 INDEX (FAST FULL SCAN) OF 'HRM_CAREER_PK' (UNIQUE) (
    Cost=12 Card=25026 Bytes=500520)
    5 3 TABLE ACCESS (FULL) OF 'HRM_CAREER' (Cost=81 Card=25
    335 Bytes=5421690)
    Statistics
    3671 recursive calls
    9 db block gets
    1758 consistent gets
    2130 physical reads
    0 redo size
    2217762 bytes sent via SQL*Net to client
    10359 bytes received via SQL*Net from client
    898 SQL*Net roundtrips to/from client
    128 sorts (memory)
    1 sorts (disk)
    13454 rows processed
    TKPROF
    TKPROF: Release 9.2.0.6.0 - Production on Wed Dec 12 18:40:56 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Trace file: qnhg_ora_500.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    ALTER SESSION SET EVENTS '10046 trace name context forever, level 8'
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 1 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 34.45 34.45
    select condition
    from
    cdef$ where rowid=:1
    call count cpu elapsed disk query current rows
    Parse 4 0.00 0.00 0 0 0 0
    Execute 4 0.00 0.00 0 0 0 0
    Fetch 4 0.00 0.00 0 8 0 4
    total 12 0.00 0.00 0 8 0 4
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY USER ROWID CDEF$
    select *
    from hrm_career x
    WHERE x.begin_date = ( SELECT MAX(begin_date)
    FROM hrm_career y
    WHERE y.employee_id = x.employee_id AND
    begin_date <= SYSDATE AND
    primary_job = 'Y') AND
    x.primary_job = 'Y'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.07 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 898 0.00 2.39 2038 946 9 13454
    total 900 0.00 2.46 2038 946 9 13454
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Rows Row Source Operation
    13454 FILTER
    25335 SORT GROUP BY
    67496 HASH JOIN
    25333 INDEX FAST FULL SCAN HRM_CAREER_PK (object id 25292)
    25336 TABLE ACCESS FULL HRM_CAREER
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: CHOOSE
    13454 FILTER
    25335 SORT (GROUP BY)
    67496 HASH JOIN
    25333 INDEX GOAL: ANALYZED (FAST FULL SCAN) OF 'HRM_CAREER_PK'
    (UNIQUE)
    25336 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'HRM_CAREER'
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 898 0.00 0.00
    SQL*Net more data to client 877 0.00 0.05
    db file sequential read 1 0.01 0.01
    db file scattered read 60 0.00 0.14
    direct path write 9 0.00 0.00
    direct path read 125 0.05 0.13
    SQL*Net message from client 898 0.02 1.47
    DELETE FROM PLAN_TABLE
    WHERE
    STATEMENT_ID=:1
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 6 6 6
    Fetch 0 0.00 0.00 0 0 0 0
    total 4 0.00 0.00 0 6 6 6
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Rows Row Source Operation
    0 DELETE
    0 TABLE ACCESS FULL PLAN_TABLE
    Rows Execution Plan
    0 DELETE STATEMENT GOAL: CHOOSE
    0 DELETE OF 'PLAN_TABLE'
    0 TABLE ACCESS (FULL) OF 'PLAN_TABLE'
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 2 0.00 0.00
    SQL*Net message from client 2 14.77 14.79
    select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,
    o.dataobj#,o.flags
    from
    obj$ o where o.obj#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 0 3 0 1
    total 3 0.00 0.00 0 3 0 1
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    EXPLAIN PLAN SET STATEMENT_ID='PLUS74964' FOR select *
    from hrm_career x
    WHERE x.begin_date = ( SELECT MAX(begin_date)
    FROM hrm_career y
    WHERE y.employee_id = x.employee_id AND
    begin_date <= SYSDATE AND
    primary_job = 'Y') AND
    x.primary_job = 'Y'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.01 0 4 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.00 0.01 0 4 0 0
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 0.00 0.00
    insert into plan_table (statement_id, timestamp, operation, options,
    object_node, object_owner, object_name, object_instance, object_type,
    search_columns, id, parent_id, position, other,optimizer, cost, cardinality,
    bytes, other_tag, partition_start, partition_stop, partition_id,
    distribution, cpu_cost, io_cost, temp_space, access_predicates,
    filter_predicates )
    values
    (:1,SYSDATE,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,
    :20,:21,:22,:23,:24,:25,:26,:27)
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 6 0.00 0.00 0 3 6 6
    Fetch 0 0.00 0.00 0 0 0 0
    total 7 0.00 0.00 0 3 6 6
    Misses in library cache during parse: 1
    Misses in library cache during execute: 2
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN) (recursive depth: 1)
    Rows Execution Plan
    0 INSERT STATEMENT GOAL: CHOOSE
    select o.name, u.name
    from
    sys.obj$ o, sys.user$ u where obj# = :1 and owner# = user#
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 0 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 1 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 1
    Parsing user id: SYS (recursive depth: 1)
    SELECT ID ID_PLUS_EXP,PARENT_ID PARENT_ID_PLUS_EXP,LPAD(' ',2*(LEVEL-1))
    ||OPERATION||DECODE(OTHER_TAG,NULL,'','*')||DECODE(OPTIONS,NULL,'','
    ('||OPTIONS||')')||DECODE(OBJECT_NAME,NULL,'',' OF '''||OBJECT_NAME||'''')
    ||DECODE(OBJECT_TYPE,NULL,'',' ('||OBJECT_TYPE||')')||DECODE(ID,0,
    DECODE(OPTIMIZER,NULL,'',' Optimizer='||OPTIMIZER))||DECODE(COST,NULL,'','
    (Cost='||COST||DECODE(CARDINALITY,NULL,'',' Card='||CARDINALITY)
    ||DECODE(BYTES,NULL,'',' Bytes='||BYTES)||')') PLAN_PLUS_EXP,OBJECT_NODE
    OBJECT_NODE_PLUS_EXP
    FROM
    PLAN_TABLE START WITH ID=0 AND STATEMENT_ID=:1 CONNECT BY PRIOR ID=PARENT_ID
    AND STATEMENT_ID=:1 ORDER BY ID,POSITION
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 2 0.00 0.00 0 22 0 6
    total 4 0.00 0.00 0 22 0 6
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Rows Row Source Operation
    6 SORT ORDER BY
    6 CONNECT BY WITH FILTERING
    1 NESTED LOOPS
    1 TABLE ACCESS FULL PLAN_TABLE
    1 TABLE ACCESS BY USER ROWID PLAN_TABLE
    5 NESTED LOOPS
    6 BUFFER SORT
    6 CONNECT BY PUMP
    5 TABLE ACCESS FULL PLAN_TABLE
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: CHOOSE
    6 SORT (ORDER BY)
    6 CONNECT BY (WITH FILTERING)
    1 NESTED LOOPS
    1 TABLE ACCESS (FULL) OF 'PLAN_TABLE'
    1 TABLE ACCESS (BY USER ROWID) OF 'PLAN_TABLE'
    5 NESTED LOOPS
    6 BUFFER (SORT)
    6 CONNECT BY PUMP
    5 TABLE ACCESS (FULL) OF 'PLAN_TABLE'
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 2 0.00 0.00
    SQL*Net message from client 2 0.09 0.09
    SELECT ID ID_PLUS_EXP,OTHER_TAG OTHER_TAG_PLUS_EXP,OTHER OTHER_PLUS_EXP
    FROM
    PLAN_TABLE WHERE STATEMENT_ID=:1 AND OTHER_TAG IS NOT NULL ORDER BY ID
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 0 3 0 0
    total 3 0.00 0.00 0 3 0 0
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    Rows Row Source Operation
    0 SORT ORDER BY
    0 TABLE ACCESS FULL PLAN_TABLE
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: CHOOSE
    0 SORT (ORDER BY)
    0 TABLE ACCESS (FULL) OF 'PLAN_TABLE'
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 2 0.00 0.00
    SQL*Net message from client 2 0.00 0.00
    ALTER SESSION SET EVENTS '10046 trace name context off'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 30 (ADMIN)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 7 0.00 0.09 0 4 0 0
    Execute 8 0.00 0.00 0 6 6 6
    Fetch 901 0.00 2.39 2038 971 9 13460
    total 916 0.00 2.49 2038 981 15 13466
    Misses in library cache during parse: 6
    Misses in library cache during execute: 1
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 906 0.00 0.00
    SQL*Net message from client 906 34.45 50.82
    SQL*Net more data to client 877 0.00 0.05
    db file sequential read 1 0.01 0.01
    db file scattered read 60 0.00 0.14
    direct path write 9 0.00 0.00
    direct path read 125 0.05 0.13
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 7 0.00 0.00 0 0 0 0
    Execute 11 0.00 0.00 0 3 6 6
    Fetch 5 0.00 0.00 0 11 0 5
    total 23 0.00 0.00 0 14 6 11
    Misses in library cache during parse: 4
    Misses in library cache during execute: 2
    9 user SQL statements in session.
    6 internal SQL statements in session.
    15 SQL statements in session.
    5 statements EXPLAINed in this session.
    Trace file: qnhg_ora_500.trc
    Trace file compatibility: 9.02.00
    Sort options: default
    3 sessions in tracefile.
    12 user SQL statements in trace file.
    8 internal SQL statements in trace file.
    15 SQL statements in trace file.
    11 unique SQL statements in trace file.
    5 SQL statements EXPLAINed using schema:
    ADMIN.prof$plan_table
    Default table was used.
    Table was created.
    Table was dropped.
    3945 lines in trace file.
    Message was edited by:
    Maran Viswarayar

  • Why can't I find events with cmd-F? I can see the appointment I am searching for, but the search cmd-F function does not find it. Why is this. It used to work...

    Why can't I find events with cmd-F? I can see the appointment I am searching for, but the search cmd-F function does not find it. Why is this. It used to work...

    Why can't I find events with cmd-F? I can see the appointment I am searching for, but the search cmd-F function does not find it. Why is this. It used to work...

  • Why is the Star Transformation using two indexes for the same dimension?

    Hi,
    Recently, I have made an investigation about the Star Transformation feature. I have found a strange test case, which plays an important role in my strategy for our overall DWH architecture. Here it is:
    The Strategy:
    I would like to have the classical Star Transformation approach (single column Bitmap Indexes for each dimension foreign key column in the fact table), together with additional Bitmap Join Indexes for some of the dimension attributes, which would benefit from the materialization of the join (bitmap merge operation will be skipped/optimized).
    The query:
    select dp.brand, ds. region_name, dc.region_name
         , count(*), sum(f.extended_price)
      from fact_line_item  f
         , dim_part       dp
         , dim_supplier   ds
         , dim_customer   dc
    where dp.mfgr        = 10                 -- dimension selectivity = 1/10 --> acttual/fact selectivity = 6/10
       and f.part_dk      = dp.dk
       and ds.region_name = 'REGION #1' -- dimension selectivity = 1/9
       and f.supplier_dk  = ds.dk
       and dc.region_name = 'REGION #1' -- dimension selectivity = 1/11
       and f.customer_dk  = dc.dk
    group by dp.brand, ds. region_name, dc.region_name
    The actual plan:
    | Id  | Operation                              | Name                        | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT                       |                             |      1 |        |  3247 (100)|      1 |00:01:42.05 |     264K|    220K|
    |   1 |  HASH GROUP BY                         |                             |      1 |      2 |  3247   (1)|      1 |00:01:42.05 |     264K|    220K|
    |*  2 |   HASH JOIN                            |                             |      1 |  33242 |  3037   (1)|    217K|00:01:29.67 |     264K|    220K|
    |*  3 |    TABLE ACCESS FULL                   | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      4 |
    |*  4 |    HASH JOIN                           |                             |      1 |  33245 |  2934   (1)|    217K|00:01:29.10 |     264K|    220K|
    |*  5 |     TABLE ACCESS FULL                  | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.08 |     316 |      8 |
    |*  6 |     HASH JOIN                          |                             |      1 |  33248 |  2831   (1)|    217K|00:01:28.57 |     264K|    220K|
    |*  7 |      TABLE ACCESS FULL                 | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |   8 |      PARTITION RANGE ALL               |                             |      1 |  36211 |  2827   (1)|    217K|00:01:28.01 |     264K|    220K|
    |   9 |       TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM              |      6 |  36211 |  2827   (1)|    217K|00:01:33.85 |     264K|    220K|
    |  10 |        BITMAP CONVERSION TO ROWIDS     |                             |      6 |        |            |    217K|00:00:07.09 |   46980 |   3292 |
    |  11 |         BITMAP AND                     |                             |      6 |        |            |     69 |00:00:08.33 |   46980 |   3292 |
    |  12 |          BITMAP MERGE                  |                             |      6 |        |            |    193 |00:00:02.09 |    2408 |   1795 |
    |  13 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   4330 |00:00:04.66 |    2408 |   1795 |
    |  14 |            BUFFER SORT                 |                             |      6 |        |            |     60 |00:00:00.01 |       6 |      0 |
    |* 15 |             TABLE ACCESS FULL          | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |* 16 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_PART_DIM_KEY_BIX |     60 |        |            |   4330 |00:00:02.11 |    2402 |   1795 |
    |* 17 |          BITMAP INDEX SINGLE VALUE     | FACT_LI__P_PART_MFGR_BJX    |      6 |        |            |   1747 |00:00:06.65 |     890 |    888 |
    |  18 |          BITMAP MERGE                  |                             |      6 |        |            |    169 |00:00:02.78 |   16695 |    237 |
    |  19 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   5460 |00:00:01.56 |   16695 |    237 |
    |  20 |            BUFFER SORT                 |                             |      6 |        |            |   5460 |00:00:00.02 |     316 |      0 |
    |* 21 |             TABLE ACCESS FULL          | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     316 |      0 |
    |* 22 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_CUST_DIM_KEY_BIX |   5460 |        |            |   5460 |00:00:02.07 |   16379 |    237 |
    |  23 |          BITMAP MERGE                  |                             |      6 |        |            |    170 |00:00:03.65 |   26987 |    372 |
    |  24 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   6672 |00:00:02.23 |   26987 |    372 |
    |  25 |            BUFFER SORT                 |                             |      6 |        |            |   6672 |00:00:00.01 |     316 |      0 |
    |* 26 |             TABLE ACCESS FULL          | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      0 |
    |* 27 |            BITMAP INDEX RANGE SCAN     | FACT_LI__S_SUPP_DIM_KEY_BIX |   6672 |        |            |   6672 |00:00:02.74 |   26671 |    372 |
    The Question:
    Why is the Star Transformation using both indexes FACT_LI__P_PART_DIM_KEY_BIX and FACT_LI__P_PART_MFGR_BJX for the same dimension criteria (dp.mfgr = 10)?? The introduction of the additional Bitmap Join Index actually make Oracle to do the work twice !!!
    Anybody, any idea ?!?

    Dom, here it is the plan with the predicates:
    | Id  | Operation                              | Name                        | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT                       |                             |      1 |        |  3638 (100)|      1 |00:06:41.17 |     445K|    236K|
    |   1 |  HASH GROUP BY                         |                             |      1 |      2 |  3638   (1)|      1 |00:06:41.17 |     445K|    236K|
    |*  2 |   HASH JOIN                            |                             |      1 |  33242 |  3429   (1)|    217K|00:08:18.02 |     445K|    236K|
    |*  3 |    TABLE ACCESS FULL                   | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.03 |     319 |    313 |
    |*  4 |    HASH JOIN                           |                             |      1 |  33245 |  3326   (1)|    217K|00:08:17.47 |     445K|    236K|
    |*  5 |     TABLE ACCESS FULL                  | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     319 |    313 |
    |*  6 |     HASH JOIN                          |                             |      1 |  33248 |  3223   (1)|    217K|00:08:16.63 |     445K|    236K|
    |*  7 |      TABLE ACCESS FULL                 | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |   8 |      PARTITION RANGE ALL               |                             |      1 |  36211 |  3219   (1)|    217K|00:08:16.30 |     445K|    236K|
    |   9 |       TABLE ACCESS BY LOCAL INDEX ROWID| FACT_LINE_ITEM              |      6 |  36211 |  3219   (1)|    217K|00:08:40.89 |     445K|    236K|
    |  10 |        BITMAP CONVERSION TO ROWIDS     |                             |      6 |        |            |    217K|00:00:32.00 |   46919 |  19331 |
    |  11 |         BITMAP AND                     |                             |      6 |        |            |     69 |00:00:34.50 |   46919 |  19331 |
    |  12 |          BITMAP MERGE                  |                             |      6 |        |            |    193 |00:00:00.58 |    2353 |      1 |
    |  13 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   4330 |00:00:00.10 |    2353 |      1 |
    |  14 |            BUFFER SORT                 |                             |      6 |        |            |     60 |00:00:00.01 |       6 |      0 |
    |* 15 |             TABLE ACCESS FULL          | DIM_PART                    |      1 |     10 |     3   (0)|     10 |00:00:00.01 |       6 |      0 |
    |* 16 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_PART_DIM_KEY_BIX |     60 |        |            |   4330 |00:00:00.07 |    2347 |      1 |
    |* 17 |          BITMAP INDEX SINGLE VALUE     | FACT_LI__P_PART_MFGR_BJX    |      6 |        |            |   1747 |00:01:23.64 |     882 |    565 |
    |  18 |          BITMAP MERGE                  |                             |      6 |        |            |    169 |00:00:09.14 |   16697 |   7628 |
    |  19 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   5460 |00:00:02.19 |   16697 |   7628 |
    |  20 |            BUFFER SORT                 |                             |      6 |        |            |   5460 |00:00:00.01 |     316 |      0 |
    |* 21 |             TABLE ACCESS FULL          | DIM_CUSTOMER                |      1 |    910 |   102   (0)|    910 |00:00:00.01 |     316 |      0 |
    |* 22 |            BITMAP INDEX RANGE SCAN     | FACT_LI__P_CUST_DIM_KEY_BIX |   5460 |        |            |   5460 |00:00:08.78 |   16381 |   7628 |
    |  23 |          BITMAP MERGE                  |                             |      6 |        |            |    170 |00:00:21.46 |   26987 |  11137 |
    |  24 |           BITMAP KEY ITERATION         |                             |      6 |        |            |   6672 |00:00:10.29 |   26987 |  11137 |
    |  25 |            BUFFER SORT                 |                             |      6 |        |            |   6672 |00:00:00.01 |     316 |      0 |
    |* 26 |             TABLE ACCESS FULL          | DIM_SUPPLIER                |      1 |   1112 |   102   (0)|   1112 |00:00:00.01 |     316 |      0 |
    |* 27 |            BITMAP INDEX RANGE SCAN     | FACT_LI__S_SUPP_DIM_KEY_BIX |   6672 |        |            |   6672 |00:00:20.94 |   26671 |  11137 |
    Predicate Information (identified by operation id):                                                                                                  
       2 - access("F"."SUPPLIER_DK"="DS"."DK")                                                                                                           
       3 - filter("DS"."REGION_NAME"='REGION #1')                                                                                                        
       4 - access("F"."CUSTOMER_DK"="DC"."DK")                                                                                                           
       5 - filter("DC"."REGION_NAME"='REGION #1')                                                                                                        
       6 - access("F"."PART_DK"="DP"."DK")                                                                                                               
       7 - filter("DP"."MFGR"=10)                                                                                                                        
      15 - filter("DP"."MFGR"=10)                                                                                                                        
      16 - access("F"."PART_DK"="DP"."DK")                                                                                                               
      17 - access("F"."SYS_NC00017$"=10)                                                                                                                 
      21 - filter("DC"."REGION_NAME"='REGION #1')                                                                                                        
      22 - access("F"."CUSTOMER_DK"="DC"."DK")                                                                                                           
      26 - filter("DS"."REGION_NAME"='REGION #1')                                                                                                        
      27 - access("F"."SUPPLIER_DK"="DS"."DK")                                                                                                           
    Note                                                                                                                                                 
       - star transformation used for this statement                                                                                                     

Maybe you are looking for