Why B * TREE index does not work when ask explicit type conversion.

What is the job of back-end of B * column indexed with numeric type data when to perform explicit Conversion in the WHERE clause of number of Char.

Basically my question is why index does not work when applying both sides TO_CHAR conversion in where clause?

Let's say we have a table with 1 million rows

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

Create Table T (collar number);

-The unique index on the column.

CREATE A UNIQUE IDX_T ON T (CSA COL) INDEX.

-Insert the statement on the table with million lines

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

Begin

For I In 1.1000000 loop

Insert Into Values T (I);

End loop;

COMMIT;

End;

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

We have different situations using

explain plan for select col from t where col =?;

SELECT * FROM TABLE (DBMS_XPLAN. DISPLAY);

Case 1.  Where COL = 50555;

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

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

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

0 | SELECT STATEMENT |       |     1.    13.     0 (0) | 00:00:01 |

1.  INDEX UNIQUE SCAN | IDX_T |     1.    13.     0 (0) | 00:00:01 |

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

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

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

1 - access ("COL" = 50555)

Case 2.  Where COL = '50555';

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

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

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

0 | SELECT STATEMENT |       |     1.    13.     0 (0) | 00:00:01 |

1.  INDEX UNIQUE SCAN | IDX_T |     1.    13.     0 (0) | 00:00:01 |

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

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

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

1 - access ("COL" = 50555)

Case 3.  Where TO_CHAR (COL) = 50555;

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

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

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

0 | SELECT STATEMENT |      |     1.    13.   470 (6) | 00:00:06 |

1.  TABLE ACCESS FULL | T    |     1.    13.   470 (6) | 00:00:06 |

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

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

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

1 - filter (TO_NUMBER (TO_CHAR ("COL")) = 50555)

Case 4. Where TO_CHAR (COL) = '50555';

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

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

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

0 | SELECT STATEMENT |      |     1.    13.   463 (5) | 00:00:06 |

1.  TABLE ACCESS FULL | T    |     1.    13.   463 (5) | 00:00:06 |

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

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

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

1 - filter (TO_CHAR ("COL") = '50555')

Why the access descriptor became predicate to filter in case 3 and 4?

Please, help me understand.

ACCESS (Index Scan) - Oracle tries to use an index one try to access a table row that they are interested.

FILTER (full table scan) - Oracle has no any tool to directly get to the table of ranks it is interested in, so it must pass all the lines and then filter the rows that match the main condition.

Tags: Database

Similar Questions

  • Why only a helmet does not work when plugged into my macbook pro?

    I have a macbook pro 2012 middle and when plug my headphones in the headphone plug-in, and only the left earpiece works. Ive tried several types of headphones, all with the same result and then tried in my iPhone and they work fine. Any suggestions would be greatly appreciated!

    The sound balance is set in the sound preferences, right (in the Middle, I mean).

  • Why SAVE20LR promotional code does not work when you try to buy the upgrade to LR5?

    I live in New Zealand and I try to buy the Lightroom update your LR3 to LR5 online by using the promo code SAVE20LR to save 20% (valid until 3 December), but it says "invalid Promotion Code. According to http://www.adobe.com/store/en_au/popup/offer/LR5_save20_2013.html conditions, it should work, I had real trouble, call the customer service. Have tried and cut off from the third three times, have been left on hold for 25 minutes. Please can someone help?

    This was previously reported by others too

    http://forums.Adobe.com/message/5874880

    Try to contact Adobe directly such as suggested in this thread.

  • Why the object_not_found exception does not work?

    Posters,

    I have the following statement in a package.procedure:

    -- (...)
    Start

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double
    -- (...)

    exception
    When dbms_metadata.object_not_found then
    null;

    end;
    -- (...)

    Execution is stopped in the select, not enter the exception and the following message is displayed in PL/SQL Developer MicroHelp:

    + "ORA-31608: specified object type INDEX not found." + "

    I did it another way by adding the following clause:

    -- (...)
    Start

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double
    where exists (select 1+)
    of all_indexes+.
    where table_owner = 'OWNER'+.
    and table_name = sTableName); +
    -- (...)

    exception
    + When no_data_found then +.
    null;

    end;
    -- (...)

    It works, but: why the object_not_found exception does not work?

    Thanks in advance for everyone!
    Philips

    Oh I just noticed:

    What happens if instead of this:

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double

    you say:

    cDDL: = dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName);

    ?

  • As I installed Sierra, my Trusteer account to my Bank quit and does not work when I reinstall. Neither will Quickbooks!

    As I installed Sierra, my Trusteer account to my Bank quit and does not work when I reinstall. Neither will Quickbooks! Help!

    Trusteer (report) has caused a lot of problems Mac users such noted search Apple Support communities here.

  • Satellite A660 - Webcam does not work when using Skype

    I recently bought a Satellite A660-15J. I am running Windows 7 64 bit.

    I have the latest version of Skype (5.3.0.111).

    The integrated Webcam does not work when you run Skype. If I run the Toshiba Web Camera Application the webcam works fine. However, when I test it in Skype, I get a message saying "cannot start video. Try quitting other programs that use the webcam '.

    However, as far as I can tell there no other programs available. I have tried Skype with the Web Camera Application clised & open. I also confirmed that I do run the latest version of the program.

    One of the main reasons we have this laptop is to use Skype video... Help, please.

    Disable webcam application start-up and exit this application before you start Skype.

    I used Skype many different models of laptops, including friends A660 and it worked correctly.

    When you open Skype video settings is listed as default camera USB webcam?

  • The slide show feature does not work when I used my Apple TV new 4th gen. I have all the minimum requirements for Macbook and Macbook OSX the Airport express. The slide show starts and stops after that 7 photos are displayed on the TV. If I change the

    The slide show feature does not work when I used my Macbook with new Apple TV 4th gen. The slide show stops after that display 7 photos and display to select the options for the slide show is displayed on the screen. The selected interval was 5 seconds. If the interval is spent in 3 seconds the slide show would work for a time and then to display random images. Has worked with Apple on this issue Support Mike and he managed to reproduce the problem. Since I'm in the return period of 14 days for this product, I returned it to the Apple store

    Welcome to the Apple community.

    After returning, I'm not really clear on what your question.

  • Event does not work when I have my variable of variable mutual FUND!

    Hello

    I programmed a labview vi to add a field to a list view when a Boolean variable value is changed. I used a case Event (value change event) structure to determine if a variable value is changed, it works when I force the Boolean control with my mouse click, but it does not work when the value of the variable is modified by the mutual FUND. What should I use instead?

    Value change events are based on the interaction of the user (or the same ejection programmatically based on the value property node (signaling).)  It is not based on a control change via a regular, variable property node local, terminal or any other connecito0n programmatic or binding.

    You must simply query the variable and determine when it changes.  In this case, you can then use the node value property (signs) in the case of event fire.

  • Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game. __Keyboard is very good

    Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game.
    Keyboard is fine.  Is this a compatibility issue?

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

  • Sound does not work when it is connected to the TV with HDMI

    I have a HP Pavilion Notebook PC, DV7 - 6813EV, running windows 7 Home Premium 64-bit SP1. My problem is that I have no sound when connected to my TV HDMI connection and press. Please could someone help me? Thanks in advance

    Hello gematz,

    The sound does not work when it is connected to the TV via HDMI.

    Go to start.

    Type sound.

    Click sound

    On the playback tab, click with the right button on the HDMI interface, and then select set as default device.

    If you do not see the HDMI, right click and select devices see off, then set as default.

    I would like to know how everything goes.

  • Here's a strange. I have a HTML page with this time a wmv video. It works perfectly from a USB stick or SD card, but does not work when they are copied to the hard drive

    I have an HTML page created with web expression 4. It contains only a wmv video. It works perfectly when it is called from a USB stick or SD card, but does not work when they are copied to the hard drive. The results are the same with IE and Firefox. It don't make no difference if I use Media Player V9 or V11. He has no control on the page Media Player. Video and html files are in the same directory. Here is the code snippet:

    LIFT, DRAG, THRUST and GRAVITY










    If I run it on a machine with Win 7 there is no problem.

    Richard Grosser

    Hi Richard c. Grosser,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Microsoft Expression forums.

    http://social.expression.Microsoft.com/forums/en-us/categories

  • AutoPlay feature does not work when you insert a CD-ROM into the CD drive

    Original title: computer disc drive

    Download or CD extract of music reading, record music, download CD etc... Before my hard drive had to be replaced, when a disc is inserted into my computer, a window appears, asking what you want to do... Burn music, Rip, copy in folder etc... now when I insert a disk, the window no longer appears, which gives you options and you get to this site... How can I get that back?

    Hey Big-Mack,

    Try the steps of troubleshooting mentioned in the following article and check the result.
    See the enforcement function automatic or AutoPlay feature does not work when you insert a CD-ROM into the CD drive

    If the problem persists, run the Autoplay Repair Wizard and check the result.
    See Autoplay Repair Wizard

    Play functionality; New in Windows Media Player 12 makes it easy to listen to the music, video and photos from your computer to other computers, TVs or stereo on your home network.
    For more information, see play in

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • LAN does not work when the Cisco E1000 router hangs

    Original title: Download sp3

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! I bought recently a new Cisco E1000 router. My computer is a laptop model Lenovo 0769.

    I am running windows XP with sp2. The cisco software requires sp3. I called support of cisco and even they couldn't get to download sp3. My network is wireless on the router and I had to install from another laptop computer on the system. My LAN does not work when hooked. What do you suggest to me.

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Hi mdenrique,

    1. what exactly do you mean by LAN (Local Area Network) does not work? You get the error message?

    If you have not installed Service Pack 3, try the following steps:
    Step 1: Download Service Pack 3
    see How to obtain the latest Windows XP service pack .
    b. scroll the window and click on "Download now the Windows XP Service Pack 3 package" to download the service pack.
    c. save the file on the desktop.

    Step 2: Install Service Pack 3
    a. open the file downloaded and follow the instructions in the wizard to complete the installation.
    b. restart the computer once the installation is complete.

    For more information, see steps to take before you install Windows XP Service Pack 3

    Note: Once you have installed service pack 3, install the router and check if the problem persists.

    Step 3: To troubleshoot LAN, run home and small Office Networking Troubleshooter
    a. Click Start and then click Help and Support.
    b. under Pick a help topic, click Network and Internet.
    c. under network and the Web, click on resolution of networking or Web problems and then click on home and small Office Networking convenience store.
    d. answer the questions in the troubleshooter to try to find a solution.

    For more information, see the following articles:
    1 see How to troubleshoot a network in Windows XP
    2 see two resources to solve the problems of connection network in Windows XP

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows Media Player does not work when I Google Chrome on pagers Web in Google Chrome

    Windows Media Player does not work when I go on Google Chrome on WebPagers in Google Chrome please help me

    Hello

    1 What is this problem occurs with the Google chrome or windows media player?

    2 are you able to play another song from Player Windows Media outside the Google Chrome?

    3. have you made changes on your computer?

    4. have you received an error message?

    I suggest you to follow the steps and check.

    http://support.Google.com/chrome/bin/answer.py?hl=en&answer=95697

  • Why xbox 360 controller does not work with all pc games

    Why xbox 360 controller does not work with all pc games

    Ask in an xbox forum.

Maybe you are looking for