can we create an index only for a given value in a column?

desc TAB_A
-----------------
id1  Number Primary key,
id2  Number,
col1 varchar2(10),
col2 varchar2(10)



select count(*) from TAB_A
--------------------
4587609

select count(*) from TAB_A where id2=10 
------------------
6000

Here is my question


can i create an index only for the cloumn id2 only for the value 10?
Thank you
Mike

Hi, Mike,.

You can have a function-based index.

CREATE INDEX tab_a_id2_10 ON tab_a
(   CASE
        WHEN  id2 IN (10)
        THEN  id2
    END
);

In Oracle 11.2, it might be cleaner to have a virtual column (indexed).

Tags: Database

Similar Questions

  • Can I create an APP only for offline use?

    without publication on the App Store (DPS, simple editing)?

    Not without an enterprise with Adobe and Apple-level account.

    However, you can use Adobe Content Viewer to share with a limited audience.

    Bob

  • Can I create a password protected for members only page?

    Can I create a password protected for members only page?

    Muse does not support this natively, but you could password protect the page with a simple cut and paste javascript - see this article: http://www.javascriptkit.com/script/cut10.shtml

    That should allow you to lock certain pages, and you can then provide a password for your users. You could also change the password every month, protect the directories/different sections of the site and so on.

  • How to create a partition only for my operating system another to play with me?

    My relay problem that I had towing partition C: and D: drive, but I had to remove my D: drive because my C: drive was full, and now I want to create and partition only for my O.S. and only this, so that any other program can be installed in my D: drive.

    Someone could answer my question A.S.A.P. Please, I want to know if I can do it or not, and if I can how to do it.

    Before trying to partition, which is shown in management disks for disk 0? (the name of the partitions & sizes)

    This PC came with win7 preinstalled, and if yes do you have does the recovery discs?

    Note If you attempt to partition, without first giving that info, you can trash your system and lose everything on the disc

  • How can I create a language pack for Windows 7?

    How can I create a language pack for Windows 7

    No! You can use the language packs provided by Microsoft. "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • How can I create a better UI for Blackberry?

    How can I create a better UI for Blackberry?

    Do you it with love.

    or you could try this.

  • How can I create sequential shooting (1 for each 'row') numbers in a script in multiple column?

    How can I create sequential shooting (1 for each 'row') numbers in a script in multiple column?

    Sorry, but for now there no such function to put sequential numbers in the column number drawn.

  • Can I create an index on a partitioned table bitmap?

    Can I create an index on a partitioned table bitmap?

    Yes, you can. But an index on a partitioned table bitmap must be a local index.
    Image bitmap index on non partitioned tables cannot be partitioned.

  • How can we create a read only user for the peoplesoft back-end database

    Hi all
    I have fscm9.0 installed instance peoplesoft. Told me to create a new user similar to sysadm but with read-only access, an agency can help in this reagard?

    Create a user ordinary daabase.
    Create a public synonym for objects of the SYSADM.
    Finally GRANT SELECT on each unique objecs (tables and views) to SYSADM objects to the new user.
    You could also work through a database of ROLE and giving the role to the new user.

    Nicolas.

  • Can we create list Action Pitstop for optimization PDF

    Hello world

    I want to optimize the PDF for the Web and other files. Could you please confirm what can we create the Pitstip action list or profile of preflight for PDF Optimization as shown in Acrobat Professional.

    And confirm can save us the preset as a file separate from the optimizer?

    Please suggest.

    Thank you

    Sandra

    Acrobat and PitStop are two distinct products, even if they work together.

    PitStop action lists only works in Enfocus products.

    It is likely that you can do anything you want to optimize the PDF file. Send me a PM if you want to explore this option.

  • Can I create pages that only authorized users can access?

    I need to create pages that only authorized users can access, is - it possible to do away with the Muse?

    Site manager should be included in section admin, please give me the url of the site to take a peek.

    Regarding the other question, you want to create an intranet site for employees of the company or site of secure content where users would have to login before they can access the content?

    If its with intranet then it would not be possible with BC because that website hosting in British Colombia will be on the web and may not be restricted on the intranet site, you can create the site of Muse and upload to the server of third party or company where it can be used as intranet site.

    With a secure content, you can secure pages and the content created on end of BC and use the connection on the home page.

    Thank you

    Sanjit

  • How to create a validation only for the lines that are created in a table

    Hi all

    I have a simple question. Is it possible to create a validation in a table that fires only for created?

    There is a possibility at the APEX 4.1 choose two types of "* execution scope *" is first of all ' * created and updated lines * "and the second is" * all subject lines. "

    Thanks in advance!

    Kind regards

    Jiri

    Hello Jiri,

    > Is it possible to create a validation in a table that fires only for created?

    You can still use the field lines created and updated the and use a PL/SQL Expression condition of:

    :APEX$ROW_STATUS = 'C'
    

    You will also need to change the Condition run for each line.

    It will be useful,
    Arie.

    -------------------------------------------------------
    Be sure to mark the appropriate fix/useful messages. For the long term, it will benefit us all.

  • Can I create a single app for android with the edition folio professional digital edition?

    Hi, (sorry but I speak English a bit).

    I would like to create my application with professional edition because I won't see it on Android too, but I need just a single folio app.

    I'm not a multifolio Viewer, I need just a single updatable app that start directly from the icon withouth any other number.

    How can I do?

    I see also that many functions are limited to android, is there news?

    Thank you very much

    You can not.

    Even if the subscription app has only a folio in there, you must

    Create it like that for Android. This requires a pro or a company

    account and you will have to pay for downloads.

  • How can I create a full recovery for OS and preinstalled software media?

    Hello
    My son´s accompanying the new Satelite L855-10U preinstalled OS and much other software already installed on the HARD drive, but no installation media, the client is supposed to create a tool from Toshiba.

    I created 6 Swedish recovery for the operating system using the tools Toshiba had installed on the HARD drive.

    To do this 6 Swedish, I created with the Toshiba Recovery tool contain the operating system and all other preinstalled software?

    How can I create the installation media full and usable if not for the operating system and all other preinstalled software?

    I can´t find all the information on the backup software pre-installed with the exception of the BONE. Is there complete information how to do the above, in the manual of the computer, or have you missed this information?

    I would like to know how I can create media backup complete and usable for the operating system as well as for all other preinstalled software, so I can recreate all the facilities of the plant at a new disk if/when the original HARD disk crashes.

    Is there a partition hidden with pre-installed software, and if so, how can I create a backup of this partition, or all the software, so I can reinstall everything if the HARD drive fails, if it is already not with the Swedes 6 Toshiba tool created for me?

    Forward to your response and to complete your customer documentation about the complete instructions for installation and recovery media creation.

    Thank you very much!

    Baltazar

    Hello

    On this forum, you will find a lot of useful comments on the recovery image saved on the HARD drive and its operation to the facility and the creation of recovery disks.
    All this is clearly and simply.

    Front of Toshiba offer new people for laptop in software development create recovery image. This recovery image will be created for each laptop model (specific hardware configuration). Recovery image contains the operating system, all necessary drivers, tools/utilities Toshiba specific and some other software like DVD/Blu-Ray, Microsoft Office test drive and the antivirus application. With this configuration every laptop owner can begin to use the laptop without having to install important applications.

    This package is then saved on the HARD drive and can be used for the installation of HARD drive recovery - http://aps2.toshiba-tro.de/kb0/HTD1303440001R01.htm. In other words, if something is wrong with HARD drive recovery facility you can reset the preinstalled operating system and reinstall recovery imae. After that make you have absolute same settings you had after purchase and first start of the laptop.
    HARD drive recovery image can not be used if:
    -HARD drive is defective
    -you have installed the version of the own BONE
    Structure of the HARD disk partitions - is changed
    Recovery image - HARD drive is deleted or moved to another partition or copied to the external device.

    To avoid all this Toshiba recommends the creation of recovery disks. Using these disks, you will be able to install the OS on the new drive HARD or in any other situation listed above.
    Please note: the use of recovery disks will remove all HARD drive, create the new recovery partition and install image recovery, so you still have the same settings.

    I hope I can help you with my explanation. If you have any other questions you are welcome.

  • can I create a DLL file for labview that has DLL library with inside?

    Hello everyone,

    I am developing an application for the cards PCI devicenet in labview (beginner to labview) environment.  Is there a DLL file for the PCI card from the provider. But it's too complicated for a beginner to call each function in the DLL of labview. Therefore, I'm trying to re - use a VC ++ program (working properly) that calls some sellers DLL library functions.    To do this, I created the DLL file which includes all headers and libraries the provider DLL, as indicated in the attached figure. But I couln can't see the effect on the device. is it possible to create a DLL file for labview that has DLL library with inside? If this is not the case, how can I implement the program shown in figure?

    I would like to wish a huge as to advance.

    It is not something I have a lot of experience in so I don't know all the details of the restrictions or requirements etc - but it is certainly possible to create wrappers for the dll and then use them in LabVIEW - this is sometimes necessary to convert some native types/data structures in C/C++ into something that you can switch to your other DLL LabVIEW.

    There is a link here: http://digital.ni.com/public.nsf/allkb/06ECDC689DDA0F3D862574440074CD95

Maybe you are looking for