More than one index for a column.

Hi,
I am trying to create more than one index for a particular column of the table.But oracle does not allow more than one index for a column.
I just want to make sure whether we can add more than one index for a column
and if yes what are the scenarios.
Because as far as i know some database allows more than one index for a single column.

You cannot create more than one index for the same column(s).This is not so true Nicolas. Look at following example:
SQL> create index idx_mytest_id on mytest(id);
Index created.
SQL> create index idx_mytest_id_desc on mytest(id desc);
Index created.
SQL> create index idx_fbi_mytest_id_upper on mytest(upper(id));
Index created.
SQL> create index idx_fbi_mytest_id_upper_desc on mytest(upper(id) desc);
Index created.
SQL> create index idx_fbi_mytest_id_lower_id on mytest(lower(id));
Index created.
SQL> create index idx_fbi_mytest_id_lower_id_dsc on mytest(lower(id) desc);
Index created.
SQL> create index idx_fbi_mytest_id_tr_up on mytest(trunc(upper(id)));
Index created.
-- I can still continue but for this example this will be enough
SQL> select index_name from dba_indexes where table_name = 'MYTEST';
INDEX_NAME                                                                                                    
IDX_MYTEST_ID                                                                                                 
IDX_FBI_MYTEST_ID_UPPER                                                                                       
IDX_MYTEST_ID_DESC                                                                                            
IDX_FBI_MYTEST_ID_UPPER_DESC                                                                                  
IDX_FBI_MYTEST_ID_LOWER_ID                                                                                    
IDX_FBI_MYTEST_ID_LOWER_ID_DSC                                                                                
IDX_FBI_MYTEST_ID_TR_UP                                                                                       
7 rows selected.You can see 7 indexes for one column (ID) and I could still continue...
So according this test we can say you can't create more than one index for one column (or the same group of columns in case of composite index) with same condition(s).
Message was edited by:
Ivan Kartik
Or simplified: you can't create the same index for same column(s) twice :-)

Similar Messages

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

  • Multi-column Index vs One index for each column

    Hello everyone,
    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...
    br flag

    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...What's the version of your data base? what kind of database you have, DWH or OTLP? The answer might depend on the type of database as far as bitmap indexes might suit or might not depending if you are runing DWH or OLTP kind of database
    Let me suppose that you are runing OLTP database and you have a where clause with 8 columns.
    1) are all those where clause equalities (where col1 = and col2 =) or there are inequalities?
    2) could you evaluate the most repetitive columns?
    3) could you know the column that could have the best clustering factor (the column which most follow a certain order in the table)
    Based on that I would suggest to create one b-tree index having 8 columns (even though that it seems for me to high) this index should follow the following points:
    1) put the most repetitive column at the leading edge (and compress the index if necessary)
    2) put the columns that are used in equalitity predicate first
    3) put the column having the best clustering factor first
    The most precise index you have the best access you could gain.
    Of course that you have to know that an index access is not always good and a FULL table scan is not always bad.
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

  • Can I have more than one ID for my iPad

    Can I use more than one ID for my iPad, iPhone and iPod.? I am using the same for all 3 now.
    My wife have one iPod and can I share my apps with her.? And if...How?
    We are using the same computor for all devices.
    Thanks in advance....
    Best regards.....Reidar45

    The spell check goes with the keyboard layout being used.  Just activate both English and French in Settings > General > Keyboard and then use the Globe key to switch between them.
    (I think there is bug in Pages, however, so that this doesn't work for that -- you have to change the OS language).

  • Can i create more than one instance for single database?

    HI
    anybody can tell me how to create more than one instance for single database(without using RAC)?
    thanks
    Kalanidhi

    Anandji,
    I sometimes think differently. I also think like what this person is asking..(although I have installed and administering 5 different RAC databases)
    The main doubt of mine is that we create multiple instances accessing the same storage area.
    Anyway the controlfiles of all instances will have the same information except the instance_names and instance id's.
    Hence I always think , why can't it be possible to to create another instance in the same system and point it to a controlfile which is copied from the other instance.
    Why can't the same files be shared between the two instances in a same system ?
    I know I am thinking a little bit confusing...
    Anyway I need to test that also...
    Mahesh.

  • Creating more than one account for a single user

    I was wondering, if I creat more than one account for me (the only person that uses my powerbook) is that going overboard? I mean, lets say I am logged into the standard account and I want to learn more about the bash shell and using terminal which I am new to, if I **** something up will the whole system be toast or will only things in that account be messed up? Like could I then just log into my admin account and delete the other messed up one? Or no? My theory was that this was a way of keeping my comp safe from myself, being that I am new to macs and moreso that I am new to the unix side of things and want to start learning the command line without worrying about screwing up my whole system. I would just use the standard account for everyday use (like what I do now) or experiment with terminal, and when I need to download something or change some settings that requires me to be logged in as admin then I would log in and download what I need then log out and use it in the standard account...am I just wasting my time? Is what I am doing any "safer" than just having one admin account and thats it?
    Thanks for all the help! It feels good to be a part of the goodguys team =)
    Thanks again!

    Ghost,
    First, I don't subscribe to the "one should not use an admin account" philosophy. For someone who is the owner and main user of any given machine, I see the use of anything but an admin account a bit anal, totally unecessary, and needlessly complicating.
    On the other hand, I don't see the need for more than one admin account on any given machine. Yes, I see exceptions to this, and many people favor having a second admin account as a "backup," but I have never had more than one admin account on any of my machines, and have never encountered a situation where one would have helped.
    In short, I like the idea of having a "main" admin account that is used most of the time, and then having "secondary" accounts (all non-admin) for any additional users that might log in.
    Now, any limitations that apply to you as a GUI user of an account, admin or not, will apply to you at the command line as well. In other words, you can't get yourself into any more trouble at the command line than you can within the GUI. In fact, you might even be better protected at the command line than you are in the GUI. I say this because any action that would ordinarily "elevate" you above the standard capabilities of a non-admin user require the use of "sudo." Avoid the use of sudo, and you can avoid any problems.
    That doesn't mean that you wouldn't be able to do something stupid that might wreck an account that contains "all of your stuff," and on which you depend. It is not likely that you would damage your System, but it is entirely conceivable that you might, for example, accidently delete or overwrite your entire HOME folder. Oops!
    If you simply don't trust yourself with the command line, a second account might be a good place to experiment. Maybe create it as a non-admin account at first, with the option to change it to an admin account at a later time, when you want to learn how to use "sudo" to do more powerful things. By then, you will understand what not to do. Eventually, you will have the confidence to use the command line in your own account, which will have been an admin account all this while.
    Scott

  • More than one role for a clip.Is it possible?

    Is it possible assign more than one role for a clip?
    thx

    Only one video role, only one audio roll, per clip.  Only one as these are "Media Stems", and when you work with Stems, only one roll per asset video, one per asset audio.

  • More than one style for a single link state?

    RH 8 outputting CHM
    Hello,
    Is it possible to define more than one style for a single link state?
    For example, I would like a link in the footer of my master page to be smaller than the links that appear in the body of my topics. I want to retain behavior, and simply change the point size.
    I can't simply hand format in Design mode, because my link is within a script. Or, am I missing something easy here?
    Thanks much.

    I'm pleased to say I figured out how to change the formatting of a hyperlink embedded within a script.
    Within the script, I used a var string to reproduce the text in my link. Then I used another var to change the string size.
    So, here's the part of my script that produces what I'm after:
    var mailDisplay = 'Was this information helpful? ';
    var str = 'Was this information helpful?';
    var mailDisplay = str.fontsize("1");
    Upon generation of the CHM, the script trumps the CSS. It's a beautiful thing.

  • Pass more than one argument for action in the URL

    Hi,
    i've created a DesktopURL object with which i refere back to the Front Page. With the same URL i want to minimize two channels at the same time. I know that i can minimize one channel with the "action=minimize&provider=myProvider" attribute.
    Is there a way to pass more than one provider for an action ?
    Or exists another way to do that ?
    thx

    In fact, my code was completely right. I tried with commas and it hasn't work. When I tried again without commas it worked perfectly...
    Nevertheless, thanks for the advice!
    Gilmar

  • SapScript - Print table out_par - more than one entry for object

    Hi Gurus,
    following problem.
    I have a SapScript form and call an external program from within the form.
    In this programm I get more than one entry for the same out_par-value - this is correct.
    My problem now is that on the form there is only printed one of the entrys.
    Here my coding in SapScript.
    /:           DEFINE &ZZ_OBJECT& = '        '
    /:           PERFORM LESEN_OBJEKTLIST IN PROGRAM ZIHFORM
    /:           USING &CAUFVD-AUFNR&
    /:           CHANGING &ZZ_OBJECT&
    /:           ENDPERFORM
    *           All involved object:
    *           &ZZ_OBJECT&
    Many thanks in advance for your help.
    Regards

    In Sapscript PERFORM-ENDPERFORM statements, the parameters can contain only one value as they are variables of type character & length 80.
    If you want multiple values in your CHANGING parameters, fetch all of them in different variables. Also, in your program store them in the same order, in the output internal table of structure ITCSY.
    Check this thread
    http://wiki.sdn.sap.com/wiki/display/profile/ExternalSubroutinesinSAPScript

  • Can we give more than one value for an Authorization field in Auth-Check.

    Hi all,
    Can we give more than one value for an Authorization field in Auth-Check.
    Ex: AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD <Value 1> <Value 2> <Value 3>.
    IF SY-SUBRC 0.
    MESSAGE E...
    ENDIF.
    If yes, please help me with exact syntax.
    Think it will be like
    ID 'CUSTTYPE' FIELD: <Value 1>, <Value 2>, <Value 3>.

    Hi,
    yes we can give more than one field.
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object> 
       ID <authority field 1> FIELD <field value 1>. 
       ID <authority field 2> FIELD <field value 2>. 
       ID <authority-field n> FIELD <field value n>. 
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    please reward points, if it is useful.
    satish.

  • Can we have more than one contructor for one class?

    I need to provide more than one constructor for one class because I need to have one parameter passed to one constructor and many to another. Is that possible and how it will affects in the instantiation of the object?
    Thanks again
    Jorg3

    One more note about constructors...
    if you define a constructor to take argument(s)
    and don't define the default constructor it is not available.
    Example
    public class myClass
       public static void main(String args[])
          // Ok
          myClass c = new myClass("Hello World");
         // Not Ok
         myClass c2 = new myClass();
       } // main
       public myClass(String name)
          named = name;
       } // myClass
      String named = null;
    } // myClassIf you want to be able to construct the object with the default and parameter constructors, you must declare them all...
    public class myClass
       public static void main(String args[])
          // Ok
          myClass c = new myClass("Hello World");
         // Ok
         myClass c2 = new myClass();
       } // main
       public myClass()
          named = "No Name";
       } // myClass
       public myClass(String name)
          named = name;
       } // myClass
      String named = null;
    } // myClass

  • Can we have more than One DC for the sales organization and Plant combo?

    Can we have more than One DC for the sales organization and Plant combination?
    If yes can you please site a practical example to clear the picture

    Hi
    First of all in SAP sales orgs are assigned to distribution channels and the combination of sales org and distribution channel which is called distribution chain is assigned to plant
    There is  no direct link  between sales org  and plant or distribution channel and plant
    So  sales org  and plant combination doesnot exists and
    it is only sales org and dist channel combination which is  called as distribution chain only exists
    Nowhere in SAP we are assigning sales org to plant
    It is because sales org alone doesnot make sense and its combination with dist channel only makes sense
    because sales org is a selling org and the distribution channel is the route to sell and this combination has only to pick the material from plant to process sales to customers
    The relation between sales org and distribution channels is many to many and also vice versa
    Multiple sales orgs can be assigned to one distribution channel and
    Multiple distribution channels  can be assigned to one sales org
    Similarly the relation ship between Distribution chain (sales org+dist channel) to plant is also many to many and vice versa
    Similarly plants from other company codes can also be assigned to Distribution chain to facilitate intercompany processes
    In whatever way look at it the multiple distribution channels can be fit anywhere
    Regards
    Raja

  • DMEE :More than one invoice for a vendor payment

    Hello Experts,
    I'm trying to create a file for payments to vendors  through transaction DMEE.
    I've create a new structure in DMEE, tree PAYM where given pace for atleast 4 invoices with semicloumn.
    but when I'm runing the payment run for more than one invoice for the same vendor, the file only shows the first one with repeation and filling all structurewith only 1st invoice.
    Issue is when payment run for a vendor for more than one invoices, only the first invoice has shown in the file.
    Sturcture of the file  coming after payment run is filled like this , pasting below for your referance.
    000000016000.0020080310             12025000003958560010000710200713      0072394000Spoerle Electronic Kft          HU010               INV.123452345434 ;INV.123452345434 ;INV.123452345434                000066                   
    INV.123452345434 is the 1st invoice.....whcih is entering one after the other instead of 2nd / 3rd invoice.
    Could you please help me?
    Thanks in advance!
    Nupur

    hi,
    i am also having same requirement.
    i have to send the payment advice details to the bank.
    for that i planned to create the settings in the DMEE.
    so plz send the steps which you are created for your requirement
    thanks ,
    Ramu

  • Need to maintain more than one address for single customer.

    Dear All,
    I need to maintain more than one address for single customer, Is it possible? If so how can I maitain kindly send the details.
    Rgds
    Srinivasan.K.R.

    Dear Srinivasan,
    I don't think you can maintain the more than one address for single customer as per the standard.
    You can this options
    1.You can create different ship to parties as per the addresses.
    2.You can change the address manually while creating sales order for single customer.
    I hope this will help you,
    Regards,
    Murali.

Maybe you are looking for

  • Purchase Order Description Text

    Hi All, I am trying to display a POD text but it is cutting off, can anyone help to write the purchase order description text. Currently it can only display only 130 characters. gv_repid = sy-repid. SELECT SINGLE ebeln INTO i_tab-ebeln FROM ekpo  WHE

  • How to find Payment term text from Terms of payment.

    Dear All, in table VBRK I can see a field Terms of Payments  - ZTERM. Now I need to find the table where I can find Payment term text field ? Can someone tell me how to research this ? Also if I know address from Kna1 ( field name adrnr ) how can i f

  • What is the CTS concept exactly in real time

    hi this is ramesh looking for abap job could u any body explain me abt CTS CONCEPT FROM STARTING TO ENDING TRANSAFOR FROM DEV TO QUALITY CLIENT

  • How to position boot drive icon to top right on clone

    Under 10.4 my boot drive icon always appeared at the top right. This is particularly useful when I boot from a clone, so that I do not carelessly do something believing that I have booted from my main drive. Under Leopard, however, the boot drive ico

  • I can't open mail & download from AppStore !!

    I update my ipad to iOS 7 but from 4 days ago I can't receive or send email from ipad also I can't download from AppStore. So I can't open some apps for example asphalt 8 and ... Please help me!