1 of the field in existing secondary index

hi,
if in the existing secondary index, among the field in the index, for example field1, field2, field3, field4;
if field3 is the only field that i need to define in the where clause in my program, do i need to create a new secondary index?
thanks

Are you executing your select clause with WHERE clause on only field 3?
If so adding your field on an existing index with 3 fields already, will not solve your purpose, if it is performance that you are looking for. You need to create a new index, if you use the select clause with only field3, in any case
That said, if you would use all field1, field2, field3, field4 in your query and the index does have only field1, field2, field4 as of now, still you should not insert field3 in the middles as all other queries dependent on previous index will now become partial key queries.
So I would suggest you to go with a new index, if the SELECT query that you are talking about is performance critical.

Similar Messages

  • Maximum Number fields in a secondary index key

    Hello All,
    We created a secondary index on BSIS which we had to drop as system was hung up. My question is how many fileds SAP recommends in a secondary index key? Ours had 6 keys including mandt.
    Thanks

    Hi Sameer,
    There is no real specification in number of fields for an index as fas as i know. Definitely 6 fields is allowed for a secondary
    index.But it really matters with the number of secondary indices. So dont create too many secondary index for a single table.
    Try to use other optimization techniques in the programming instead of creating secondary index.
    //Kothand

  • Can we change the fields of database unique index in a customised table?

    Hi all..
    I want to know that can we create or change or delete the database unique index of a customized table?
    In my case, there is a customised table with 4 primary keys with all the records to be maintained thru transaction code SM30.
    There is database unique index maintained for this table which has 2 fields. These 2 fields are out of the 4 primary fields of the table.I hope I have made myself clear!
    Now when I am trying to insert a record in the table it give me a short dump.( It says duplication of records is not allowed)
    The reason being that the new record that I am trying to insert in the database table has those 2 fields for which the unique index is maintained is the same as an already existing record.And the other two fields are different from the already existing record.So overall the combination of the 4 primary fields is different.
    Please tell me how shall I proceed now?
    I also tried to change the Unique index but it is asking me some kind of authrization(You are not authorized to make changes (authorization object S_DEVELOP)).Also I am not sure whether changing the unique index is feasible or not.?
    Thanks.

    hi
    I think you will not be able to do unique indexing withou the help of primary keys,so use all the primary keys into the table field selections  and and then create indexing otherwise dupilication of keys can occur. if you are not able to keep the primary keys then go for non unique key indexing,where you have to add the client field and the any keys of your wish.

  • Secondary index report

    I would like to create a report that lists all secondary indexes including the columns indexed.  What tables contain information on secondary indexes?  Is there an FM to get information on secondary indexes?
    Thanks In Advance.

    Hi Brad,
    The two tables you are looking for are DD12L and DD17S. Table DD12L gives you a list the seconday indexes and table DD17S gives you the list of all the fields in a secondary index.
    1) Retrieve field INDEXNAME from table DD12L where SQLTAB = <Table name>.
    2) Retrieve field FIELDNAME from table DD17S where SQLTAB = <Table name>
                                                          and    INDEXNAME = DD12L-INDEXNAME.
    This should be a simple 2 select report.
    Let me know if this helps.
    Regards,
    Mark

  • What are the disadvantages of secondary index

    Hi all,
    Can anybody tell me what are the disadvantages of creating secondary index?
    Also tell me what are the precautions should be taken to create a secondary index?

    Hi Vinil,
    You can search on SCN with the same subject... you will get lots of threads discussed on it...
    Still for your reference...
    secondary indices use disk space, not memory space. They are only in memory when they are used. Disk space is roughly width times number of records, can be GBs.
    Main disadvantages are:
    + indexes are updated when table is changed, i.e. the additional index makes other operations slower. You must check the importance of your application, if it is much lower than the standard usage than you can not create a secondary index.
    + Secondary indices can confuse the database optimzer, especially if you use field which appear also in other indices. DB calculates usefulness of different indices by some assumptions (check other sources for details), if two indices are similar, than the assumptions can lead to wrong decisions. Your new index can be used for other statements, even when it is not optimal there. Result your index causes problems somewhere else!
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • JDBC receiver error: field not exist in the table

    But the field does exist.
    Columns  Name Data Type Size Scale Not NULL Default Value
    EMPID VARCHAR2 10
    EMPNAME VARCHAR2 30
    EMPAGE VARCHAR2 3
    FLAG VARCHAR2 1
    The Database is Oracle.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'emp' (structure 'Statement1'): java.sql.SQLException: FATAL ERROR: Column 'flag' does not exist in table 'emp'.

    Does it have the field flag?? XI is case sensitive!!Check you have the correct spelling and case.
    Even if not workig use this same thread JDBC Problem Part III (SQL error?)
    Edited by: Dharamveer Gaur on Oct 10, 2008 7:56 AM

  • Can a replica node have secondary indexes the master does not?

    In a JE replication group, is it possible to instantiate a replica (non-master) node that includes additional secondary indices that the master and the other replicas do not have? I would like to have this replica node optimized for performing fast searches on the additional indexes. Previously, all my nodes have had the exact same schema with only a single, primary index. Certainly I could add the secondary indexes on all the nodes, including the master, but the other nodes won't benefit from the add'l indexes as no such searches are expected to be performed on those nodes.

    Hi,
    No, this is not currently supported. Secondaries must be created on the master as usual and will be replicated to all nodes. However, if secondaries are read frequently on a particular node, they are more likely to stay in cache on that node, or at least more so than on other nodes. So it still may be beneficial to service read requests for secondaries on a subset of nodes. This is a special case of the more general approach where read requests are balanced among nodes according to some form of data partitioning.
    The ability to store secondary indexes only on particular nodes would require several new features and is not currently planned:
    - ability to have non-replicated databases in a replicated environment
    - triggers on the replica so that secondaries can be maintained
    - automatic re-creation of indexes when a node is restored from scratch
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Effect of Secondary Index on Performance Tuning

    Hi,
    I have a select statement with the below where statement.
    WHERE keyz1 = IT_dfkkzk-keyz1
    AND bldat IN s_pblda
    AND valut IN s_pvalu.
    Table from data is accessed Primary key is a combination of two fields KEYZ1 & POSZA.
    We have a Secondary Index with OPBEL & KEYZ1.
    Will Optimizer will use Secondary Index?
    If we change the where statement as given Below
    WHERE keyz1 = IT_dfkkzk-keyz1
    Will the access be fast?
    Should i create a secondary index on keyz1 to make it fast?
    Thanks & Reagrds
    Lijo Joseph

    Hi Lijo Joseph,
    I think, optimizer will use primary key because "WHERE keyz1" references the first part of this key. Even if you change your WHERE-statement as considered, this will not change optimizer approach.
    And yes, this access should be the fastest way to access you data, besides you have more values to reduce the amount of resulting rows. For example if you could specifiy POSZA too, this would accelerate access.
    Creation of another secondary index on keyz1 will not make it faster, maybe if you include bldat and valut in this key. But notice, insertion and modification of data will then be slower.
    To get optimizer to use existing secondary index you have to specify OPBEL in your where condition like this:
    "where OPBEL = 'X' and KEYZ1 = ....."
    Herbert

  • Creation of secondary index on RSPCPROCESSLOG table

    Hello guys,
    We have detected severe performance issues while executing the transaction ST03n in our BW 3.5 System.
    Looking in the OSS notes we found the note "SAP Note 841324 - ST03N: poor performance for process chain profile" where it recommends the creation of a secondary index in the table RSPCPROCESSLOG  with the following features:
    Create another secondary index on the RSPCPROCESSLOG table with the
    following fields:
    - INSTANCE
    - TYPE
    Can you please let us know what is the step by step to proceed with the creation of this secondary index?
    Thanks for your help.
    Kind regards

    Please ask questions about Oracle Text (formerly interMedia text) in the Oracle Text forum. You will get a quicker, more expert answer there.

  • Secondary index issue

    HI Experts
                    I am having certain doubts in Secondary index i,e..
              for the table MSEG i created secondary index with LFBNR ,LFBJA, LFPOS fields ,Now in the select query if i used all these three fields in WHER condition then only the fetch will be fast ???
           OR if i use any ONE of these three fields in WHERE condition then the fetch will be normal as non-key field fetch ??
    PLease clarify me
    Regards,
    Lokesh Rangappa

    Hi Lokesh,
    a secondary index is a fine way to get data faster, if you know the contents of the secondary key fields from the first on.
    LFBNR is a very selective secondary key field, so you don't need to know the other secondary key fields and it should work fine.
    It's a good idea to have the client field MANDT always as first secondary key field, and you don't need to ask for it in the SELECT query. This will be automatically done.
    If you always know the year to access, then your secondary index should look like
    MANDT LFBJA LFBNR LFPOS
    to access data of the same year easier. If you don't kno the year, but you know the LFBNR, then your secondary index should look like
    MANDT LBBNR LFPOS LFBJA
    It is importatnt to know the first key fields of a secondary index (without the client, which will bea accessed according to SY-MANDT). And it is also important to know a selective secondary key field.
    For example it is no good idea to create a secondary index with only field LFBJA in the first year, where all entries still have the same year.
    You have to know the content of the first secondary key field(s), but you don't have to know the content of them all for SELECT queary.
    Regards,
    Klaus

  • Reoccuring missing secondary indexes in BI systems

    Hi Gurus,
    I'm been experiencing the problem of missing secondary indexes for some time, and I would like to get to the bottom of this problem.
    These are a few of the missing indexes (from DB02):-
    /BIC/F100294-900
    /BIC/F100365-900
    /BIC/F100366-900
    /BIC/F100368-900
    /BIC/F100369-900
    /BIC/F100386-900
    /BIC/FZCFIGRLP-900
    /BIC/FZCGLECRD-900
    /BIC/FZCGLECRD2-900
    /BIC/FZCGLECRD3-900
    TSP03-1
    TSP03L-A
    Any idea what could be causing this???
    And how do I solve this problem??? And how can I prevent these from reoccuring again???
    Thanks.
    Cheers,
    KeatSeong

    I see missing indexes on DB02 as well and ran SAP_INFOCUBE_INDEXES_REPAIR and I just have a couple more questions that I think is relevant to this chain:
    1) It repaired some fact indexes like /BIC/F* and dimension indexes like /BIC/D* but in the report showed as follows for those cubes:
    0  ZPP_C008     :          0  secondary indexes repaired.
    2) I had some other dimension indexes like /BIC/D* that did not get repaired and I'm wondering why. See 4) below for how I repaired those.
    3) I ran RSRV and these missing indexes like /BIC/D* do not show up as being an issue
    4) When I run RSDU_INFOCUBE_INDEXES_REPAIR on that missing index like /BIC/D* I get E_REPAIRED = 0 and system error: RSDU_INFOCUBE_INDEXES_REPA_ORA but when I refresh DB02 the index is gone. When I go to RSDU_INFOCUBE_INDEXES_REPA_ORA and run it I got e_reparied - 11
    Thanks for all your help.
    Mike
    Edited by: Michael Hill on May 26, 2010 6:49 PM

  • SAP Cloud SDK : Default Check in Marketing Lead for Field "Use Existing Account"

    Hi Experts,
    I have requirement to enhance the standard business object Marketing Lead screen. In that screen i need to make default check on "Use Existing Account" checkbox when user click on New Marketing Lead or QC option.
    I have tried using Application studio but the field "Use Existing Account" not exist in cloud repository its on Front-end UI screen.
    How i can make default value check to this checkbox in UI designer for standard screen
    Or
    How i can make default value check to this checkbox using ABSL code.
    Please refer the screen as shown below.
    Regards,
    Mithun

    Mithun,
    Could you please check Fine tune options available for Leads ?
    Under Involved Parties there is an option "Forbid Manual Changes". For Account Party Role if you select that it will not allow user to enter new account information.
    Fine -Tune -> Leads - > Involved Parties -> Account
    - Shrikant

  • How does BDB update its secondary index?

    I am asking how does Berkeley DB update its secondary index?
    For example, in a BDB table with key value pair ``<k,v1>``, the index database would have reversed pair like ``<v1,k>``. Upon an insert (or essentially an update) ``<k,v2>``, base table record ``<k,v1>`` should be overwritten to ``<k,v2>``.
    But how would BDB deal with ``<v1,k>`` in the index table? Will it delete it immediately?

    Hi,
    As long as you correctly open the primary database and secondary index database, and associate the secondary index database with the primary, any update on the primary database will be reflected in the secondary index.
    For more information, please refer to Reference Guide for Berkeley DB -> Chapter 3.  Access Method Operations -> Secondary Indexes section.
    Regards,
    Cindy Zeng

  • What is the "No database index" means when you Creating Secondary Indexes?

    HI,
       I'm Creating Secondary Indexes in the maintenance screen of the table(se11)
       There are three options under "Non-unique Index":
       1.Index on all database systems
       2.For selected database systems
       3.No database index
    My questions is :
      What do u mean by "No Database Index" and when is it used.
      Can anybody plz tell me what's the difference of this three options ?
      Here is what i found in the help:
       No database index: The index is not created in the database. If you
       choose this option for an index that already exists in the database,
       it is deleted when you activate this option.

    Hi,
    It is clear from the help documentation,
    Here see what the help document says:
    Create the index in the database (selection)
    Whether an index improves or worsens performance often depends on the database system. You can therefore set whether an index defined in the ABAP Dictionary should be created in the database.
    This makes it easier to install a platform-specific customer system.
    You can set this option as follows:
    1. Index in all database systems: The index is always created in the database.
    2. In selected database systems: The index is created depending on the database system used. In this option, you must specify the databases in which the indexes are to be created. You can do this either on an inclusive (list of systems on which it should be created) or an exclusinve (list of systems on which it should not be created) basis. In either case, you can list up to four different database systems.
    3. No database index:: The index is not created in the database. If you set this option for an index that already exists in the database, it is deleted when you activate the table in the ABAP Dictionary.
    Note: Unique indexes have an extra function, and must therefore always be created in the database. The database system prevents entries or index fields being duplicated. Since programs may rely on this database function, you cannot delete unique indexes from the database.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Using a byte[] as a secondary index's key within the Collection's API

    I am using JE 4.1.7 and its Collections API. Overall I am very satisfied with the ease of using JE within our applications. (I need to know more about maintenance, however!) My problem is that I wanted a secondary index with a byte[] key. The key contains the 16 bytes of an MD5 hash. However, while the code compiles without error when it runs JE tell me
    Exception in thread "main" java.lang.IllegalArgumentException: ONE_TO_ONE and MANY_TO_ONE keys must not have an array or Collection type: example.MyRecord.hash
    See test code below. I read the docs again and found that the only "complex" formats that are acceptable are String and BigInteger. For now I am using String instead of byte[] but I would much rather use the smaller byte[]. Is it possible to trick JE into using the byte[]? (Which we know it is using internally.)
    -- Andrew
    package example;
    import com.sleepycat.je.Environment;
    import com.sleepycat.je.EnvironmentConfig;
    import com.sleepycat.persist.EntityStore;
    import com.sleepycat.persist.PrimaryIndex;
    import com.sleepycat.persist.SecondaryIndex;
    import com.sleepycat.persist.StoreConfig;
    import com.sleepycat.persist.model.Entity;
    import com.sleepycat.persist.model.PrimaryKey;
    import com.sleepycat.persist.model.Relationship;
    import com.sleepycat.persist.model.SecondaryKey;
    import java.io.File;
    @Entity
    public class MyRecord {
    @PrimaryKey
    private long id;
    @SecondaryKey(relate = Relationship.ONE_TO_ONE, name = "byHash")
    private byte[] hash;
    public static MyRecord create(long id, byte[] hash) {
    MyRecord r = new MyRecord();
    r.id = id;
    r.hash = hash;
    return r;
    public long getId() {
    return id;
    public byte[] getHash() {
    return hash;
    public static void main( String[] args ) throws Exception {
    File directory = new File( args[0] );
    EnvironmentConfig environmentConfig = new EnvironmentConfig();
    environmentConfig.setTransactional(false);
    environmentConfig.setAllowCreate(true);
    environmentConfig.setReadOnly(false);
    StoreConfig storeConfig = new StoreConfig();
    storeConfig.setTransactional(false);
    storeConfig.setAllowCreate(true);
    storeConfig.setReadOnly(false);
    Environment environment = new Environment(directory, environmentConfig);
    EntityStore myRecordEntityStore = new EntityStore(environment, "my-record", storeConfig);
    PrimaryIndex<Long, MyRecord> idToMyRecordIndex = myRecordEntityStore.getPrimaryIndex(Long.class, MyRecord.class);
    SecondaryIndex<byte[], Long, MyRecord> hashToMyRecordIndex = myRecordEntityStore.getSecondaryIndex(idToMyRecordIndex, byte[].class, "byHash");
    // END

    We have highly variable length data that we wish to use as keys. To avoid massive index sizes and slow key lookup we are using MD5 hashes (or something more collision resistant should we need it). (Note that I am making assumptions about key size and its relation to index size that may well inaccurate.)Thanks for explaining, that makes sense.
    It would be the whole field. (I did consider using my own key data design using the @Persistent and @KeyField annotations to place the MD5 hash into two longs. I abandoned that effort because I assumed (again) that lookup with a custom key design would slower than the built-in String key implementation.)A composite key class with several long or int fields will not be slower than a single String field, and will probably result in a smaller key since the UTF-8 encoding is avoided. Since the byte array is fixed size (I didn't realize that earlier), this is the best approach.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How to create a Z Function Module

    Hi,   I am trying to create a Z function module in BI 7.0 that i can use in Transformations. SE37> Name of FM.Create..> It is prompting me to enter Function Group. What is Function Group and How can i create a new function group (Detail Steps please)

  • Connecting MacBook Pro to Projector

    First - I am new to mac, so I think the answer to my question is probably a simple one, but I am just not sure where I can fix this. I want to connect my MBP to a projector, but when I do this, the only information displayed/sent to the projector is

  • Subscreen issue -Copied Standard program

    Hi, I copied a standard Transaction program of KKS1 and changed an Include for our requirement.I activated all screens and GUI's  and also Includes . When I run this Z Transaction I am getting an Error saying Subscreen in not available. Although stan

  • How to read stdio of another program

    Hi, I have a program that reads data from PC serial port and prints that into the command prompt (stdio) in text format. The idea has been that the output is redirected to a file and then the file is analysed off-line with Excel or Matlab. Now I woul

  • Why is my Ipad calendar keep crashing?

    What is causing my calendar on my IPad to keep crashing?