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

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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

sybrand_b wrote:
Implicit conversion in Oracle is always done like this
empno='10'
is rewritten as
to_char(empno)='10'
Now you have <function>(<indexed columnn>) = <hardcoded literal>
Oracle never puts a conversion function at the right hand side of the expresssion. NEVER.
SQL> create table emp as select * from scott.emp;
Table created.
SQL> alter table emp add constraint emp_pk primary key (empno);
Table altered.
SQL> @desc emp
Name                                      Null?    Type
EMPNO                                     NOT NULL NUMBER(4)
ENAME                                              VARCHAR2(10)
JOB                                                VARCHAR2(9)
MGR                                                NUMBER(4)
HIREDATE                                           DATE
SAL                                                NUMBER(7,2)
COMM                                               NUMBER(7,2)
DEPTNO                                             NUMBER(2)
SQL> select * from emp where empno = '10'
  2
SQL> @xplan
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Compatibility is set to 11.2.0.0.0
Plan hash value: 4024650034
| Id  | Operation                   | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |        |     1 |    87 |     1   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| EMP    |     1 |    87 |     1   (0)| 00:00:01 |
|*  2 |   INDEX UNIQUE SCAN         | EMP_PK |     1 |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - access("EMPNO"=10)Edited by: William Robertson on Jan 30, 2011 12:56 PM - added DESCRIBE

Similar Messages

  • Why index is not used by this table

    Dear all,
    Currently I'm facing problem with tuning one sql statement.
    It shows that full table scan in ZTLTBC_FILTER cost 15:19.
    But in table ZTLTBC_FILTER, it have index with field
    index 1    MANDT INT_NAME FNAME VALUE
    index 2    MANDT EXEC_ID COUNTER
    index 3    MANDT INT_NAME VALUE
    the last statistic date for these index is three months before
    Could you please help to find out the reason why index is not used?  statistics are old or small distinct value for field INT_NAME?
    How to solve this full table scan problem?
    Thanks & Regards,
    Chris
    sql statement
    SELECT T_00."MANDT",T_00."EXEC_ID",T_00."COUNTER",T_00."FNAME",T_00."INT_NAME",T_00."VALUE"
    FROM "ZTLTBC_FILTER" T_00
    WHERE T_00."MANDT"=:A0 AND T_00."INT_NAME"=:A1 AND EXISTS
    (SELECT T_100."INT_NAME"
    FROM "ZTLTBC_MIRR_BUFF" T_100
    WHERE T_100."MANDT"=:A2 AND T_100."INT_NAME"=:A3 AND T_100."EXEC_ID"=T_00."EXEC_ID" AND
    T_100."COUNTER"=T_00."COUNTER")
    | Id  | Operation            | Name               | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                    |       |       |       |   176K(100)|          |
    |*  1 |  HASH JOIN RIGHT SEMI|                    |  9958K|  1111M|   598M|   176K  (2)| 00:17:53 |
    |*  2 |   INDEX RANGE SCAN   | ZTLTBC_MIRR_BUFF~0 |  9958K|   484M|       |  6265   (1)| 00:00:39 |
    |*  3 |   TABLE ACCESS FULL  | ZTLTBC_FILTER      |    13M|   822M|       |   150K  (2)| 00:15:19 |
       1 - access("T_100"."EXEC_ID"="T_00"."EXEC_ID" AND "T_100"."COUNTER"="T_00"."COUNTER")
       2 - access("T_100"."MANDT"=:A2 AND "T_100"."INT_NAME"=:A3)
       3 - filter(("T_00"."INT_NAME"=:A1 AND "T_00"."MANDT"=:A0))

    Hello Bret,
    I'm using oracle 11.2
    Thanks & Regards,
    Chris

  • Indexes not used in Oracle 8i

    Hi Everybody,
    Does anybody know how can i know which indexes are not used in our Oracle 8iR3 Database.
    We need to purge as soon as possible all indexes not used
    in our Datawarehousing system because they're growing and growing.
    I know there's some mechanism in Oracle 9i to query which are unused is it possible to simulate something similar?
    Kind regards and thank you in advance.
    José Luis Pérez
    [email protected]

    Are you asking about index monitoring in 8i? One way (and there aren't very many at all) of doing this is to collect (query them out of the DD) execution plans and scan those for index usage.

  • I have just upgraded my account why can i not use it, it keeps redirecting me

    I have just upgraded my account why can i not use it, it keeps redirecting me

    Hi;
    You upgraded your FormsCentral account?  Can you explain what you mean that you cannot use it, what is happening, when and where are you being redirected?  Did you use the same email address for the upgrade as you used to sign into this forum?  We see a lot of cases where users sign into FormsCentral with one email address but then use a different during the upgrade process.  Check and see if you have another email you might have used for the upgrade.
    Thanks,
    Josh

  • Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Not a lot of details here, but my guess is this isn't working for you because you are wiring in the task to the Active Channels Property and not the actual Channel Name. I have attatched a screenshot of what I believe you are trying to do. The Task has 2 channels in it, so I need to index off one of the channels and wire it into the active channels input of the Channel Property node. Then I can read information about that channel
    Attachments:
    channel_name.JPG ‏69 KB

  • In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks

    In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks
    And please help me can type Laos font in it like andrio phone.

    Hi Cozumel,
    Thanks for posting. I'm sorry you're having problems with your bills. I can take a look at this for you. Drop me an email with your account details and a link to this thread for reference. You'll find the address in my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Why r we not use tablespce begin backup with read only tablespace

    why r we not use tablespce begin backup with read only tablespace

    Please learn English prior to posting. The schools in India are not that bad!
    Please RTFM.
    Please stop asking doc questions at lightning speed.
    Please go figure
    Sybrand Bakker
    Senior Oracle DBA

  • To transfer the data Cross the systems why we are not using BAPI Method?

    Hello All,
    To transfer the data Cross the systems why we are not using BAPI Method? why we are using only ALE/IDoc's?

    Hi Naveen,
       Listing down those I know -
       1. Master data is expected to be changed/created less frequestly.
       2. Transactional data is expected to be chnaged/created more frequestly.
       3. Transactions to create/change/display master data do no have message control integration, since you are not supposed to print/fax/mail master data to your partners.
       4. Distribution of master data in generally supposed to happen within Enterprise boundry and typically you will have one central server maintaining master data which will be distributed to multiple downstream operation system (Some thing where MDM fits). So ideally when distributing master data using ALE you will be sending it to multiple systems.
       5. Distributing transactional data PO/SO etc is same as sending fax/print which fits with the requirement of message control.
    Hope this helps,
    Regards,
    Sanjeev

  • Why can I not use my PS CS6??

    All of a sudden today 14 Feb 15, when I try to use CS6 Photoshop, which I have owned and use for years, PS starts to come up, then deletes itself and Adobe Application Manage blocks me.
    It wants me to sign up for Creative Cloud and pay! Of course I get a 30 day "free" trial and the pop up says I can continue to use CS6 after the trial if I sign up and pay for Creative Suite? I don't want Creative Suite, I want to continue to use CS6, Photoshop and all the other Adobe applications for which I paid BIG BUCKS! What is going on? How can I get PS CS6 to work as it has for many years?
    Thanks, Rus

    gener7,
    Thanks for your concern. I addressed (fixed? worked around?) the problem
    by pulling the original CS6 install DVD. I un-installed CS6 from my
    MacBook, then re-installed (providing my product s/n of course) then
    suffering though the interminable Adobe update. After many hours of this
    recovery, all seems fine (at least for now).
    Regards, Rus
    gener7  created the discussion
    >
    "Why can I not use my PS CS6??"
    >
    To view the discussion, visit:
    https://forums.adobe.com/message/7195605#7195605
    >

  • Why can i not use  my giftcard from aruba

    why can i not use my giftcard from aruba to buy in the itunes store

    that not tru i buy a lot of things with my giftard from aruba on other websides in the usa and it was no problem.
    why with the apple itunes store is it a problem i have my usa adressin miami, now i understands why they say that a galaxy is better than apple.
    there is now problems with this things

  • Why can I not use multi-touch gestures on my original iPad with iOS 5?

    Why can I not use multi-touch gestures on my original iPad with iOS 5?

    It would appear that apple has managed to p1ss off  alot of ipad one users in one fowl swoop, what makes it worse is that fact we were the early adoptors who got asked, why do you want a big iphone for? and then spent time showing people how good it was! actually promoting it for apple! and then to get this kick in the teeth is frustrating! i wish i had known about xcode before!
    however!
    keep sending feedback, i must have sent twenty yesterday and will keep sending them untill i get a reply from these idiots! and wont stop untill i do, the more feedback sheets we fill in the more they will have to listen, it takes less than a min, i just asking the same question! moaning on here wont do anything, feedback might
    also note they have changed the website now, but they have not changed the iOS5 spash screen :
    (•          AirPlay Mirroring for iPad 2 and iPhone 4S
              •          Multitasking Gestures for iPad
              ◦          Use four or five fingers to pinch to the Home Screen
              ◦          Swipe up to reveal the multitasking bar
              ◦          Swipe left or right to switch between apps)
    clearly they were planning on releasing this update to us, otherwise on the spalsh screen it would have stated ipad 2 only, note in the sentence above it states it CLEARLY makes a reference to ipad 2 for airplay, so, whatever the problem, they can fix it and they know it works!

  • Why can I not use mobile link in reader on window Vista?

    Why can I not use mobile link in reader on window Vista?

    Hi sze wing,
    Please tell us a bit more--what do you mean by "cannot use"? Do you get an error message? Or are files not syncing as you expect?
    Have you double-checked to make sure that Mobile Link is on? Please see Acrobat Help | Mobile Link: open once, read anywhere for instructions on enabling Mobile Link, if it isn't already enabled.
    If it is enabled, and things still aren't working as expected, please let us know what issue you're facing, including any error messages.
    Best,
    Sara
    [discussion moved to Adobe Reader forum]

  • Why can I not use my icloud address as my apple ID?

    Why can I not use my icloud address as my apple ID?

    This answer is probably the most popular one on the forum.  But apparently, this is a view not shared by virtually anyone else in the industry.  You can pretty much point to the same risks at stake for Google, Microsoft, Yahoo, or what-have-you.  No one else requires you to use a primary account other than their own. 
    The predicament you mentioned could easily be resolved by requiring multiple contact numbers and addresses, which Apple kind of does already.
    My thinking is there's either something more 'sinister' at play, or Apple just haven't really took the time to think about this issue.

  • I subscribe to premium and I can not open the adobe Revel in my ipad I oactualizarlo. I paid through September 2014 -.'s happening I can not use what I have already paid?

    I subscribe to premium and I can not open the adobe Revel in my ipad I oactualizarlo. I paid through September 2014 -.'s happening I can not use what I have already paid?

    Please see the response at:
    Adobe Revel 2.3.2 installation issue

  • Why exceptions are not using in BAPI

    Hi,
    I would like to know why exceptions are not using in STANDARD bapi.Is there any reason for this.
    Please explain me clearly
    Thanks in advance
    Thanks and Regards,
    Venkat

    Hi,
      If the exception is being handled by the caller, meaning that the exception is listed in the EXCEPTIONS section of the
    funciton call, then the program will handle it gracefully and continue processing,if it is not in this section of the
    funciton call, and it is raised inside the funciton module,
    it will issue an ABAP dump and end. This is true for
    foreground processing as well as background processing.
    https://forums.sdn.sap.com/click.jspa?searchID=12141509&messageID=5433799
    Regards
    Kiran Sure

Maybe you are looking for

  • Preloader stops buttons from working?!

    Hi, I made a flash file with buttons that go here and there and everything was fine except it takes a while to load so i added a preloader and suddenly the compiler is throwing the following error: Error #1009: Cannot access a property or method of a

  • Premiere elements 8 problem

    my class got premiere elements 8 on our computers and we cant use it when ever we add video to the time line or anything in the preveiw they dont show corectly but our computer should run it corectly and we dont have nivida cards and idea on what the

  • Avoid transporting data through a mapping

    Hello, folks. I have one view, which displays an alv table. Another view is opened when user wants to edit line of the table. This view is modal and has two buttons: Ok and Cancel. I made a mapping between table on the first view (lead selection) and

  • Migrate from tiger to mavericks

    My friend has Tiger on an intel iMac and she is considering buying a new iMac, probably after Mavericks is out. Will the migration utility copy her files (mostly pics) from the Tiger Mac to the Mavericks Mac?

  • Had to quit using Safari

    We have two MacbookAir at home. Since updating to Safari 4, both keep behaving oddly. Safari will start using up all cpu (more than 100% according to activity monitor, wathever that means...), and then they get hot and eventually become unusable unti