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!

why index is not used if oracle have to do implicit conversion?

672680Jan 29 2011 — edited Feb 1 2011
my db version: 10gR2

I created bitmap index on each of the column used in below sql.
the datatype of all three columns are VARCHAR2,
while i am using NUMBER in the query, which means oracle needs to do the implicit conversion before running the sql.

the problem is that, when I use NUMBER as below, execution plan will not use bitmap indexes at all.
but when I use STRING instead, it will make use of those bitmap indexes.
select  FI_YTD,1,2,FI_KPI_ID
  from DM_F_FI_ALL_KPI
  where 
    FI_KPI_ID=4140
    and FI_PERIOD=201012
    and FI_ORG_ID=10000000;
So, I wonder why? how the implicit conversion affects the access path?

Edited by: PhoenixBai on Jan 30, 2011 10:52 AM

Edited by: PhoenixBai on Jan 31, 2011 9:21 AM --added database version as 10gR2
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2011
Added on Jan 29 2011
35 comments
2,447 views