Help me with Points to be noted While creating a Secondary Index.

Hi,
There is a Secondary index created on a Z table which already have 9 secondary indexes. This is the 10th index that is created.
The Index is created as follows
MANDT             Client
DOCNUM_REF     Document number
The Table data is huge and it is more than 4Lakh records.
I have done the following analyses.
1) The fields to be used are not in any other indexes.
2) The Data is mostly different, i.e. The document reference field is having distinct data
  select a~docnum a~werks_o a~docnum_ref a~natop
         a~m_icms a~m_ipi
         b~lgort_out b~mov_est
         b~item b~matnr
    appending table ti_requisicoes
    from zsytmm_reqnfcb as a
   inner join zsytmm_reqnfit as b
      on a~branch_o eq b~branch_o
     and a~requi    eq b~requi
     and a~mask     eq b~mask
     for all entries in ti_doc_saida_del
   where a~docnum_ref   eq ti_doc_saida_del-docnum.
What else I need to check , so that the index improves the performance. The table is using in 300 reports.

Ravishankar Lanjewar wrote:
@SAP LEARNER,
>
> There is a Secondary index created on a Z table which already have 9 secondary
> indexes. This is the 10th index that is created.
>
>
> I will not recommand to create index any more on this table. If you want to create secondary index for on above table which you have mention. You don't create index only for hamper of performance of single program/report.
>
> Don't create more than 4 to 5 index on sinlge table.
>
> Refere the tread Link:[Why to create Secondary index ?|Re: When is a secondary index used (in select or where)]
Sounds like another myth that is widely spread across SAP community.
Remember, complex systems like modern DBMS do not like generalizations. I personally know standard SAP tables with 9 standard secondary indexes. In the meantime the hardware became fast enough to update several secondary indexes without really significant problems. Of course indexes require space, of course one should create indexes that are not similar and differ from each other with more than one field for example. In other words, think before creating!
But it's again incorrect to say "do not create because you already have 9 others". You did not even ask what fields are in the affected table, what are the existing indexes.
Ravishankar Lanjewar wrote:
> I will recommand to delete all the index and create 4 to 5 fresh index while doing analysis for all SQL statement using where use list  depends on where condition of SQL.
I am now trying to imagine the effort to analyze 300 reports using this table and all corresponding selects. And probably you will drop supporting indexes for several reports. Some of them may be CEO/CFO-relevant reports that will run minutes/hours instead of seconds. And I would like to see the reaction of CEO when he finds out that it was the result of your "optimization" activities.

Similar Messages

  • HT4872 I have not been able to import contacts from google or my android to my new I-phone 5. This article helps to a point until error message "cannot create account" already exist is received. Please help.

    I have not been able to import contacts from google or my android to my new I-phone 5. This article helps to a point until error message "cannot create account ... already exist" is received. Please help.

    -Reece,
    We only have 1 single domain, 1 domain forest, no subdomains, only alias. I had replied to the other post as well. But I am happy to paste it here in case anyone want to read it.
    So, after a few months of testing, capture and sending logs back and forth to Apple Engineers, we found out there is a setting in AD, under User Account that prevent us to log into AD from Mountain Lion. If you would go to your AD server, open up a user account properties, then go to Account tab, the "Do not require Kerberos preauthentication" option is checked. As soon as I uncheck that option, immediately I was able to log into AD on the Mac client. Apple engineers copied all my AD settings and setup a test environment on their end and match exact mine AD environment. They was able to reproduce this issue.
    The bad part about this is... our environment required the "Do not require Kerberos preauthentication" is checked in AD, in order for our users to login into some of our Unix and Linux services. Which mean that it is impossible for us to remove that check mark because most, if not all of them some way or another require to login into applications that run on Unix and Linux. Apple is working to see if they can come up with a fix. Apparently, no one has report this issue except us. I believe most of you out there don't have that check mark checked in your environment... Anyone out there have any suggestion to by pass or have a work around for this?

  • Strange problem while building a secondary index.

    Hi,
    I have a strange problem in creating a secondary index which is a part of primary data.
    I tested my program and a working sample program
    My data scheme looks like:
       Key = unique string
       Data = structure {
                        time_t timestamp;
        Secondary Key = timestamp in data (NOT unique)
    My BDB environment flags is "DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL | DB_THREAD"
    The primary DB is created as BTREE with a custom key compare function provided by calling DB->set_bt_compare.
    int my_key_compare(DB *db, const DBT *key1, const DBT *key2)
         const char *k1_v = (const char *)key1->data;
         const char *k2_v = (const char *)key2->data;
         return strcmp(k1_v, k2_v);
    The secondary Index DB is created as BTREE while permitting duplication. (DB_DUPSORT)
    It has two custom callback functions; one for data compare, the other for extracting a data from the primary data.
    int my_extract_timestamp(DB *db, const DBT *primary_key, const DBT *primary_data, DBT *secdondary_key)
         secondary_key->data = ( (MY_DATA *)(primary_data->data))->timestamp;
         secondary_key->size = sizeof(time_t);
         return 0;
    int my_secondary_dup_compare(DB *db, const DBT *key1, const DBT *key2)
         time_t      k1_v = *(time_t *)key1->data;
         time_t      k2_v = *(time_t *)key2->data;
         return k1_v - k2_v;
    The function 'my_extract_timestamp' is set by calling DB->associate().
    My problem is 'my_secondary_dup_compare' function called with a strange DBT values.
    I think the values should point to the value provided from my_extract_timestamp(), but they pointed to
    the key which provided when calling DB->put on the primary DB.
    Could somebody help me ?
    Any help highly appreciated.

    Hi,
    In the secondary database, the key is what you extract and the data is the key of the primary database. As your primary key is a unique string, your data in secondary database is also a unique string. The DB->set_dup_compare sets the comparison function for the duplicate data, so you are comparing time stamps on unique strings, not on what you extract.
    As you are comparing the time stamps which are the keys of secondary database, I guess here you want to set the bt_compare function instead of the dup_compare for the secondary database.
    Also, about this sentence:
    secondary_key->data = ( (MY_DATA *)(primary_data->data))->timestamp;
    The DBT.data should be an address, but this is a value here instead of an address.
    Regards,
    Winter, Oracle Berkeley DB

  • TS4020 family with multiple apple accounts, can we create a secondary "family" account?

    family with multiple apple accounts, can we create a secondary "family" account?

    You can perfectly well create a new separwate iCloud account: for this you will need to create a new Apple ID for which you will need a non-Apple email address you haven't used elsewhere for iCloud.
    That done, everyone can sign into it in System Preferences (or Settings)>Mail, Contacts & Calendars and enable the various data types in the checklist there. This is a 'secondary account': its email, Contacts and Calendars will appear alongside those in the existing 'primary account' but you don't get 'push' email (it's checked periodically) and it cannot use PhotoStream.
    Note that if you've been using the same device to create other accounts, there is a limit of three iCloud accounts which can be created by any one device, so if that's been reached you would have to use another device: once done the first device can sign into it perfectly well.

  • Problem With Sending Notification Through Fax While Creating A PO

    Hi All,
    While creating a purchase order with the output medium set to as FAX, once we click on save the entire information is actually faxed to the Number provided in the communication medium.
    Now if a problem occurs, usually a notification message is displayed, the issue is, the notification message is not getting displayed anymore even if the the fax is not being sent.
    Hence the user has no way of know that a fax was sent or not unless he check his inbox.
    I have spoken to the Basis and the Functional Consultants and they say that there is nothing wrong with the Configuration Part.
    Hence can you tell me what could be the possible reasons for this problem that is happening?
    Please Advise!!!
    Pablo

    Hi,
      Which Scenario are you  implementing??This BADI is to be implemneted for PO only if you are in the Extended classic scenario and the PO in SRM is the leading PO.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Urgent help needed : Error while creating r-tree index

    Hi All:
    When i try to create an rtree index on a multipolygon layer am getting the following error . Am using the following statement:
    CREATE INDEX SYSTEM.TEST_IDX ON SYSTEM.TEST("GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('SDO_INDX_DIMS=2')
    java.sql.SQLException: ORA-29855: error occurred in the execution of ODCIINDEXCR
    EATE routine
    ORA-00600: internal error code, arguments: [kope2upic954], [], [], [], [], [], [
    Best Regards
    Debasish Sahu

    Hi,
    There is something wrong with the data as you loaded it.
    Can you try to validate the geometries?
    Thanks,
    d

  • Points to be remember While creating master data.

    Hi Gurus,
    My client is using QM but inspection set up is not done.In material master check box for post to inspection stock is activated.Now they want to go for inspection set up in material master & using inspection types.In such case what care should be taken while creating master data. Because inspection stock will be already available while doing inspection set up & they have some batches in inspection stock which are created in year 2006- 2007.What care to be taken if we use mass processing(QA08) so that all batches which are manufactured in previous years will also get incorporated in new inspection set up.
    Any suggestions are most welcome.Thanks in advance
    Regards
    Amit

    I am putting this thread in PLM forum
    Regards
    Amit

  • Error while creating the Unique Index of the Primary Key of an Item

    Hi all,
    I have deployed a new item (CO_CONTRACTUNIT_PRODUCT) in my publication. The deploy appears to be successfull as the item can be seen in the repository through the Mobile Manager.
    The problem occurs when i sync my local DB to get the item offline. While synchronizing, the following error appears, both in the sync window and the log file ol_sync.log.
    "ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI"
    However, the debug file gives this other error regarding this table.
    ALL_INDEX:CREATE UNIQUE INDEX "TPCO_CONTRACTUNIT_PRODUCT_PK" ON CO_CONTRACTUNIT_PRODUCT (CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID) -5130Error at C:\ADE\omeprod_ol103021\olite\db\build\win\ocapi\..\..\..\src\ocapi\allindexes.cpp line:329 rc:-5130
    Build date Mar 29 2010
    okErr=(table or view %s.%s not found)
    mess=(CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID)
    AddLog(-5130 "ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI")
    But the index that is being created and is giving the error is the index created automatically with the Primary Key of the table, and so nothing has been modified in that.
    The primary key of the table is created with the three columns that are part of the index that is returning the error.
    As I could not solve the error, I tried to drop and re-create the item in the repository, but no luck. As a last option, i tried to remove the item from the repository to be able to sync properly again (just like before creating the item), but the error still happens.
    Another weird point is that i have tried creating the item in another publication of another database (but with almost equal items), and the item could was downloaded to my local DB without any problem, which makes this problem still more bizarre.
    What can it be?
    Any help would be great!
    Roshni

    have you tried unistalling the client and reinstalling it?
    schema evolution changes are not always handled correctly please check thread:
    Modification of publication item into Mobile Server
    i quote from rekounas instructions:
    If you are just adding a field, you should only have to run the alter publication item API call.
    Here is an old note on schema evolution on different scenarios. The names for the APIs that they use are now deprecated. Use the ConsolidatorManager class and call the method alterPublicationItem("PUBLICATION_ITEM_NAME", "SELECT STMT") :
    A) Add column
    1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Change the Oracle8i/9i database schema (add column)
    4. Create a Java program to call the Consolidator Admin API AlterPublicationItem()
    5. Start Mobile Server
    6. Execute a sync from the client
    7. The new column should be seen on the client. Use MSQL to check snapshot definitions.
    B) Drop column
    1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Delete column of the base table in the Oracle database schema
    4. Create a Java program to call the Consolidator Admin API DropPublicationItem()
    5. Create a Java program to call the Consolidator Admin API CreatePublicationItem() and AddPublicationItem().
    6. Start Mobile Server
    7. Execute a sync from the client
    8. The new column should be seen on the cliet. Use MSQL to check snapshot definitions.
    C) Change column datatype
    Changing datatypes in a repliatated system is not an easy task. You have to follow certain procedures in order to make it to work. Use DropPublicationItem, CreatePublicationItem and AddPublicationItem methods from the Consolidator Admin API. You must stop/start Mobile Server listener to refresh the cache.
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop/create column (do not use conversion procudures) at the base table
    4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
    5. Call CreatePublicationItem() and AddPublicationItem(). Check if the ErrorQueue and InQueue reflect the new column datatype
    6. Start Mobile Server. This automatically resumes application
    7. Client executes sync. This should drop the old snapshot and recreate the new snapshot. Use MSQL to check
    snapshot definitions.
    D) Drop table
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop base table
    4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
    5. Start Mobile Server. This automatically resumes application
    6. Client executes sync. This should drop the old snapshot. Use MSQL to check snapshot definitions.
    E) Add table
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Add new base table
    4. Call CreatePublicationItem() and AddPublicationItem() method
    5. Start Mobile Server. This automatically resumes application
    6. Client executes sync. This should add the new snapshot. Use MSQL to check snapshot definitions.
    F) Changing Primary Keys
    Chaning PK is a severe operation which must be executed manually. A snapshot must be deleted and recreated to propagate the changes to the clients. This causes a full refresh on this snapshot.
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop the snapshot using DropPublicationItem() method o
    4. Alter the base table
    5. Call CreatePublicationItem()and AddPublicationItem() methods for the altered table
    6. Start Mobile Server. This automatically resumes application
    7. Client executes sync. The old snapshot will be replaced by the new snapstot using a full refresh. Use MSQL to check snapshot definitions.
    G) To Change a Table Weight =>
    Follow the procedure below to change the Table Weight parameter. The table weight is used by the Mobile Server/Synchronization to determin the sequence in which client records are applied to the Oracle database.
    1. Run MGP to apply any changes in the InQueue to the Oracle databse
    2. Change table weight using SetTemplateItemMetadata() method
    3. Add/change constraint on the the base table which reflects the change in table weight
    4. Synchronize
    gl m8

  • Error while creating the CTXXPATH Index

    Hi,
    I tried to create the CTXXPATH index on my table, which has XMLTYPE column. But while creating the index i m getting the below error,
    Error report:
    SQL Error: ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
    ORA-29960: line 1,
    DRG-11304: function-based indexes are not supported by this indextype
    29958. 00000 - "fatal error occurred in the execution of ODCIINDEXCREATE routine"
    *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
    *Action:   Check to see if the routine has been coded correctly.
    I m using oracle 11g version. Could anyone please help me in resolving it.

    Hi,
    you can have a look at document "How to Create a Context Index Using a Function [ID 1063279.1]" at Oracle Support. You tried to create a CONTEXT index using a function but a function-based index is not supported. Workaround given in the document is to use a Multi_Column_Datastore.
    CTXXPATH is deprecated in Oracle 11.1, better is to use XMLINDEX, see http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/whatsnew.htm.
    Herald ten Dam
    http://htendam.wordpress.com

  • Need help with "ORA-00902: invalid datatype"  while creating a view

    I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options.....
    when I try ti create a view, I am getting ORA-00902 error.
    SQL> create view sales_view as
    2 select *
    3 from table(OLAP_TABLE('global DURATION session',
    4 'sales_type_table',
    5 '',
    6 'DIMENSION time_id FROM time
    7 DIMENSION channel_id FROM channel
    8 DIMENSION product_id FROM product
    9 DIMENSION customer_id FROM customer
    10 MEASURE sales FROM sales
    11 MEASURE units FROM units
    12 MEASURE extended_cost FROM extended_cost
    13 MEASURE forecast_sales FROM fcast_sales
    14 ROW2CELL olap_calc'));
    create view sales_view as
    ERROR at line 1:
    ORA-00902: invalid datatype
    ORA-06512: at "SYS.OLAPIMPL_T", line 23
    ORA-06512: at "SYS.OLAPIMPL_T", line 17
    ORA-06512: at line 4
    I am new to Oracle.... using document "40261_leveragingtools.pdf" as a guide against a cube created using "Global_AWM10g_Handson.doc".
    AWM displays data from cube without a problem.
    I would welcome any assistance.

    Can you provide the definition of sales_type_table? Also, Are all of the dimensions you have created of type TEXT?
    Swapan.

  • Problem in while creating text search index

    Hi,
    When I am tring to create a text search index I am getting the following:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: GLOBAL_LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
    ORA-06512: at "myschema.RECREATE_SEARCHINDEX", line 31
    ORA-06512: at line 2
    any idea what is causing the problem?
    saby

    Looks like you don't have a lexer called GLOBAL_LEXER, but you're trying to use it in the create index statement.
    Maybe it's owned by someone other than the current user - or maybe you meant to write WORLD_LEXER.
    Perhaps you could paste the whole index creation script here.

  • Problem while creating text search index

    Hi,
    When I am tring to create a text search index I am getting the following:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: GLOBAL_LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
    ORA-06512: at "myschema.RECREATE_SEARCHINDEX", line 31
    ORA-06512: at line 2
    any idea what is causing the problem?
    saby

    Hi,
    I think Probably what has failed is some inner kind of operation that didn't handle the exception correctly, that is dropping the offending object automatically and it issue is raised (error). Therefore you'll have to manually drop the index and re-create the desired index (that might solve your problem)
    - Pavan Kumar N

  • ORA-00439 while creating function based indexes.

    Hi everybody
    I'm working on Oracle 8.1.7 database, and try to create a function based index on a table.
    Unfortunately I get the ORA-00439 error, that recommends me not to use this feature :-(
    What should I do to activate this feature ?
    Thanx

    Try.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bi
    PL/SQL Release 10.1.0.2.0 - Production
    CORE    10.1.0.2.0      Production
    TNS for Solaris: Version 10.1.0.2.0 - Production
    NLSRTL Version 10.1.0.2.0 - Production

  • How to put a break point while creating a travel request in ess

    Hi to all experts,
    My requirement is to put a break point in the badi while creating a travel request in Ess.
    The badi name is TRIP_WEB_CHECK
    i tried both external and session bps
    i also tried this.
    break uname
    break-point
    and it is i check whether is triggering by throwing dump like ( divide by zero) it is triggering
    how to stop it while triggering

    Hi Bhanu,
    Please go through these links:
    How to debug abap code in update rules...routine?
    debug abap routine in infopackage
    Debugging of global transfer and update routine
    Debugging Start/Transfer routine
    And have a look at this demo video to know how to set up break points and how to debug an ABAP program in NW2004s:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cbb7716-0a01-0010-58b1-a2ddd8361ac0?prtmode=navigate
    Hope it helps..
    Cheers,
    Habeeb

  • HT1296 i cannot transfer some videos to my iphone 3gs. the file is in MPEG4 format. i can view in itunes but cannot be transfered to iphone. Please help me with this problem.

    i cannot transfer some videos to my iphone 3gs. the file is in MPEG4 format. i can view in itunes but cannot be transfered to iphone. Please help me with this problem.

    In iTunes, Advanced>Create iPod or iPhone version

Maybe you are looking for

  • Error 1017 received logging on to the standby

    Hi anyone, Please help me... i have database running on Oracle 10gR1 EE (10.1.0.4.0) on Linux Red Hat. and this server is replicate to DR server for backup. we change 'SYS' password about a week ago and nothing occur until today, the database is not

  • Very urgent: regarding  problem in  display of output

    hi, i am modifying a report in which i have to display the stock date wise, i.e. it will display that the at this date this amount of stock is there. currently the code is able to display the according to this criteria that if date is <= 15 then it w

  • "Filter failed" in CUPS when using IPP (HP LaserJet 500 color M551)

    I have two ArchLinux machines, one with HP LaserJet 500 color M551 connected over USB and another one on the same network. Printing over network (ipp) doesn't work: CUPS on the client says "Filter failed", so the job doesn't even reach the server. Pr

  • Computer Won't display video

    Ok so yesterday I went to put my computer into sleep mode, and when I did the power button started blinking orange. So I tried waking it up from sleep mode and it wouldn't wake up. I turned the computer off by pushing the power button and now when I

  • Changing Resource Order in Provisioned Resource Page

    Hi, Is is possible to change the order of the Resources which are getting displayed in Provisioned Resource Page.Let us say I have 2 resources A and B .I always wanted to A first and then B ,in the Provisioned resource page of that user.Any clue on h