Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Change Access Path For Optimizer

ArieanAug 1 2013 — edited Aug 1 2013

Hello All,

How do i make or push the Oracle optimizer to choose the range scan instead of skip scan?

Plan hash value: 1371174339

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

| Id  | Operation        | Name        | Rows  | Bytes | Cost (%CPU)| Time     |

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

|   0 | DELETE STATEMENT |             |  8386 |   384K|   800   (0)| 00:00:10 |

|   1 |  DELETE          | LOAN        |       |       |            |          |

|*  2 |   INDEX SKIP SCAN| IDX_LOAN_02 |  8386 |   384K|   800   (0)| 00:00:10 |

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

Predicate Information (identified by operation id):

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

   2 - access("L"."VER_NUM"=3 AND "L"."EXTRACT_DT"='2012-12-31' AND

              "L"."UNINUM"='925000')

       filter("L"."VER_NUM"=3 AND "L"."EXTRACT_DT"='2012-12-31' AND

              "L"."UNINUM"='925000' AND TO_NUMBER("L"."PROVIDER")=6)

SQL Statement:

EXPLAIN PLAN FOR

DELETE /*+ INDEX(L IDX_LOAN_02) */ FROM loan L WHERE L.provider=6 AND L.ver_num=3 AND L.EXTRACT_DT='2012-12-31' AND L.UNINUM='925000'

Table Index:

                                                       

Column_NameIndex_NameIndex_TypeUniquenessTablespace_NameColumn_Position
SURROG_LOAN_NUMIDX_LOAN_01NORMALNONUNIQUEFCSDWH_STGIND1
PROVIDERIDX_LOAN_02NORMALNONUNIQUEFCSDWH_STGIND1
VER_NUMIDX_LOAN_02NORMALNONUNIQUEFCSDWH_STGIND2
EXTRACT_DTIDX_LOAN_02NORMALNONUNIQUEFCSDWH_STGIND3
UNINUMIDX_LOAN_02NORMALNONUNIQUEFCSDWH_STGIND4

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 Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

Thank you

This post has been answered by Ariean on Aug 1 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2013
Added on Aug 1 2013
4 comments
545 views