BSAK Table -Index Issue

Hi All,
I want to access BSAK table based on following fields: BUKRS, LIFNR, ZUONR, BLART and BSCHL.
It is not having any index which fully matches with the criteria we are providing in Where clause. Hence it's using index '4' (BSAK~4) which is partly accessed.
But this is taking huge amount of time. When I checked the cost of the select statement, estimated cost was 21617 (Which is pretty high) and storage quality of this index is 87%. I think that the rebuilding index would be not help us much.
I suggested creating of secondary index but the basis team is not happy with this suggestion as this would require disk space.
So Can you please suggest what can be done or if I can access any other index?
Regards,
Pooja

Hi,
>I want to access BSAK table based on following fields: BUKRS, LIFNR, ZUONR, BLART and BSCHL.
Index 0 looks better i think:
MANDT  <-specified
BUKRS  <-specified
LIFNR    <-specified
UMSKS
UMSKZ
AUGDT
AUGBL
ZUONR  <-specified (can be used as a filter only)
GJAHR
BELNR
BUZEI
Index 4 doesn't look so good:
MANDT  <-specified
BUKRS   <-specified
REBZG
REBZJ
REBZZ
LIFNR    <-specified (can be used as a filter only)
UMSKS
REBZT
Double check your statistics. Are they reflecting the current state of the table? If in doubt, update them.
You can try to force the query to use index 0 in order to see if the run time improves.
Kind regards,
Hermann

Similar Messages

  • Sorted Table - tabix issue

    All,
    I have the following code While executing system is pointing to sy-tabix, but the data I am getting in the READ statement is from last record in the internal table
    report  z_9699_30.
    tables : eket.
    types : begin of ty_eket.
            include structure eket.
    types:  end of ty_eket.
    data: wa_eket                 type ty_eket.
    data: it_eket                 like sorted table of wa_eket
                                  with unique key primary_key
                                  components ebeln ebelp etenr
                                  with non-unique sorted key secondary_key
                                  components ebeln ebelp.
    parameters: p_ebeln like eket-ebeln.
    parameters: p_ebelp like eket-ebelp.
    select * from eket into table it_eket
          where ebeln eq p_ebeln.
          read table it_eket into wa_eket with table key secondary_key
                   components ebeln  = p_ebeln
                              ebelp  = p_ebelp.
    Please copy and execute this by giving EBELN and EBELP from EKET
    Please make sure while selecting from EKET please select data of multiple records available for same EBELP ie llike
    Here below PO # 4500000003 and for Item # 00030 is have multiple records
    Here in selection screen by giving PO # as 4500000003 (EBELN) Item # as 00030 (EBELP) , then in the above READ statement system giving SY-TABIX as 3 but if you see the WA_EKET-ETENR is showing 2 instead of 1. This is where is the issue is
    EBELN
    EBELP
    ETENR
    Header 4
    4500000003
    00010
    1
    4500000003
    00020
    1
    4500000003
    00030
    1
    4500000003
    00030
    2

    Now execute some
    MOVE sy_tabix TO lv_index.
    READ TABLE it_eket INTO wa_eket
          INDEX lv_index USING KEY secondary_key.
    BREAK-POINT.
    READ TABLE it_eket INTO wa_eket
          INDEX lv_index USING KEY primary_key.
    BREAK-POINT.
    and conclude yourself on the meaning of life index with two different keys defined...
    Regards,
    Raymond
    PS: Reference in online help for sy-tabix now
    Note that the sy-tabix system field is populated by the assigned secondary index, if sorted secondary keys are used. If this value is used for the subsequent index access to the internal table, the same table index must be explicitly used here. If used implicitly, the value would be interpreted as a primary index.

  • New tables & indexes created do not show up in dba_segments view

    Dear all,
    I have created 3 tables and some indexes, but these objects do not show up in dba_segments view. Is this a normal behaviour? Previously, with dictionary managed tablespace, I can specify the minimum extent to create, when the table/index is created. But I'm not sure how the locally managed tablespace work. Please do advice. Thank you very much in advance.
    I'm using Oracle 11g R2 (11.2.0.1.0) for Microsoft Windows (x64), running on Windows 7.
    For the purpose of reproducing this issue, I have created the tablespaces as follow:
    CREATE TABLESPACE CUST_DATA
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_DATA01.DBF' SIZE 512K
    AUTOEXTEND ON NEXT 256K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE CUST_INDX
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_INDX.DBF' SIZE 256K
    AUTOEXTEND ON NEXT 128K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLE CUSTOMER_MASTER (CUST_ID VARCHAR2 (10),
    CUST_NAME VARCHAR2 (30),
    EMAIL VARCHAR2 (30),
    DOB DATE,
    ADD_TYPE CHAR (2) CONSTRAINT CK_ADD_TYPE CHECK (ADD_TYPE IN ('B1','B2','H1','H2')),
    CRE_USER VARCHAR2 (5) DEFAULT USER,
    CRE_TIME TIMESTAMP (3) DEFAULT SYSTIMESTAMP,
    MOD_USER VARCHAR2 (5),
    MOD_TIME TIMESTAMP (3),
    CONSTRAINT PK_CUSTOMER_MASTER PRIMARY KEY (CUST_ID) USING INDEX TABLESPACE CUST_INDX)
    TABLESPACE CUST_DATA;
    SQL> SELECT TABLE_NAME, TABLESPACE_NAME
    2 FROM USER_TABLES
    3 WHERE TABLE_NAME LIKE 'CUST%';
    TABLE_NAME TABLESPACE_NAME
    CUSTOMER_MASTER CUST_DATA
    SQL> SELECT INDEX_NAME, TABLESPACE_NAME
    2 FROM USER_INDEXES
    3 WHERE TABLE_NAME LIKE '%CUST%';
    INDEX_NAME TABLESPACE_NAME
    PK_CUSTOMER_MASTER CUST_INDX
    SQL> SELECT SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, BYTES
    2 FROM USER_SEGMENTS;
    no rows selected

    Prior to 11g, when you created a table or whatever, you automatically allocated one extent.
    This is now no longer true and depends on a parameter I don't remember.
    dba_segments is a summary of dba_extents.
    Obviously, if there is no extent allocated, the table (view is defined with inner join) will not show up.
    You could qualify this is as a bug and submit a SR to Oracle. But then the performance impact may be huge.
    Sybrand Bakker
    Senior Oracle DBA

  • Is it permissable to extend an SAP-provided table index?

    (Please note I realize this might not be the best forum for this post; I did look at ABAP development, SAP on Oracle, and a few others, but given some other threads, it seemed like this might be the best place for it.  Apologies if not).
    We have a very large table (GMIA), and I noticed that two customer-created indexes can essentially be combined into one because the first index is RGRANT_NBR plus fields A and B, and the second index is RGRANT_NBR plus fields A, B, C, D, and E.  So I might as well get rid of the first index and just keep the second one having RGRANT_NBR plus fields A through E.
    However, I noticed that SAP-provided index 4 contains simply one field - RGRANT_NBR.  So ideally, I could just add fields A, B, C, D, and E to index 4, then I could get rid of my second customer-created index.
    Question:  Is it permissable to extend an SAP-provided index like this?  As a developer, I'm not in the modifying SAP objects business, but this is the first time I've been presented this situation with a table index.  Given that our GMIA table has MILLIONS of records in it, getting rid of another customer-created index completely might be a great opportunity.
    Thoughts?
    Dave

    I really don't have a requirement for this.  I'm a developer, and I've noticed some of our biggest timeout issues concern programs that hit table GMIA.  So I thought I'd take a look at GMIA and our indexes to learn more about it via SE11 and DB02.
    In our Production environment, we have over 88 million records in this table for a table size of 38.23 GB.  Aside from the 6 SAP-provided indexes, 8 customer indexes have been created by others over time.  It was in looking at these indexes that I noticed our 8th customer index, ZS8, is essentially the same 3 fields as ZS3, plus a few more fields.  Ideally, ZS8 should NOT have been created, and ZS3 should have simply been extended with the additional fields.
    It was suggested to me in another thread a long while back that I could potentially get rid of ZS3 as well and just make SAP index 4 look like ZS8 because SAP index 4 is just indexed by Grant Number (RGRANT_NBR).  ZS8's first index field is Grant Number followed by 5 or 6 additional fields.  That's why I was wondering if it was even a "thing" or a possibility to extend an SAP index, but customizing an SAP component makes Dave a very, VERY nervous boy.
    Basically, I'm alarmed at the number of records in the table and the number of indexes we have.  There's no archiving strategy here, so I probably can't do anything about the number of records in GMIA, which go back to 2006 when we first went live with SAP.  But I can clearly get rid of one customer-created index (ZS3).  And if I can deactivate SAP index 4, I would assume the system would then automatically use ZS8 since the first field is Grant Number for situations where it would have used SAP index 4.
    So that's the background here.  Honestly, I don't know how much improvement these things will make, but getting rid of ZS3 will save 5 GB of space, and presumably "deactivating" SAP index 4 would save almost 5 GB as well.  I'm assuming we might see some negligible performance gains on our table operations involving GMIA, but it's still a beast with a large number of indexes, so I don't know.
    I'm really, really interested in hearing from others' thoughts and recommendations -- your input is MOST welcome here!
    Dave

  • DB02old  showing Missing in R/3 DDIC Tables & Indexes in BI 7.0 system

    Hi,
    Db02old showing missing in R/3 DDIC Tables & Indexes ,Details given below.
                                        Tables          Indexes
    Total number                        63,413          88,532
    Total size/kb                1,208,272,704     227,436,608
    More than 1 extent                 16,499           6,629
    Missing in database                 0               0
    Missing in R/3 DDIC                 5               1
    Space-critical objects              0               0
    Unknown indexes in ABAP Dictionary
         DB indexes                       1
             /BIC/E101128~900
    Unknown objects in ABAP Dictionary
        DB tables                        5
            /BI0/1ASSET
            /BI0/1ASSET_CLAS
            /BIC/E100219
            /BIC/F101145
            /BIC/F101153
    Why it is showing ? Please advise.
    Thnks&Rgds,
    Ganga.

    Hi Bhaskar,
    I have done the below process
    In T-code DB02 Menu "Go TO" -> Table and Indices -> DB <-> ABAP Dic<->Display
    It is showing the below details
    Other checks
    Tables 1
    SCI_TEMPT Should not be created in DB
    I have select the SCI_TEMPT table and clicked on create in DB.
    After that again I have checked the db02 t-code again it is showing the same.
    Please let me know how can fix this issue.
    Regards,
    Reddy V.

  • Table & Index Compression on 11g

    Hi,
    We are planning to upgrade oracle ( RAC ) from 10.2.0.4  to 11.2 and planning to turn on table and index compression. I would like to learn the pros & cons of turning compression on in a 6TB database. Any performance issues after table/index compression .
    Thanks
    Prince Jose

    Hey Prince,
    Just check out the below thread if it can give you some idea for the same...
    Re: Index Compression in SAP - system/basis tables?

  • Substitution in BSAK table

    In FI module, would  it be  possible to do a substitution through GBB1 in BSAK table, or only would it be possible in BSEG and BKPF?
    Thanks in advance, apañeros

    BSAK is an index table with redundant data from BKPF and BSEG, filled via MOVE-CORRESPONDING, so fields of the same name in BSAK as in BKPF/BSEG should show the same substituted value (if the field is allowed for substitution).
    Try it out if in doubt.
    Thomas

  • Partitioning Tables/Indexes

    Hi,
    Oracle Version 10.2.0
    O/S Version: SUSE Linux
    Currently all the tables and indexes are stored in the NFS mount ponit. I would like to know whether can I partition the tables/indexes onto local storage temporarily.
    Thanks

    Hi
    Yes you can do this. But if you have some partitions on NAS and some on local disk then depending on the nature of the queries/DML you will see some performance issues.
    MSK

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • To Use  Cursor or  TYPE table Index by PLS_integer

    Hi All,
    Let's see if I have table with no. of records 19,26,20,000.
    If I want to loop through all the records which will be a optimized way To Use Cursor or TYPE table Index by PLS_integer.
    Please guide.
    Thanks.

    What is it you want to do to/with the rows you're looping through?
    Ideally you want to avoid looping, as that's row by row (aka slow by slow) processing and it's expensive time-wise.
    If you're doing DML (insert/update/delete) then you're best off doing it in one sql statement, rather than looping.

  • Fact Table index vs BIA Index

    BIA gurus..
    Prior to our BIA implementation we had the drop and rebuild index process variants in our process chains.
    Now after the BIA implementation we have the BIA index roll-up process variant included in the process chain.
    Is it still required to have the drop and rebuilt index process variants during data load ?
    Do the infocube fact table indexes ever get hit after the BIA implementation ?
    Thanks,
    Ajay Pathak.

    I think you still need the delete/create Index variants as it not only helps in query performance but also speeds up the load to your cubes.
    Documentation in Perfomance tab:
    "Indices can be deleted before the load process and after the loading is finished be recreated. This accelerates the data loading. However, simultaneous read processes to a cube are negatively influenced: they slow down dramatically. Therefore, this method should only be used if no read processes take place during the data loading."
    More details at:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a6473e07211d2acb80000e829fbfe/frameset.htm]

  • Need to find total no fo  tables/index/m.views in my database

    Hello Everyone ;
    How can i find total no fo  tables/index/m.views in my database ?
    when i  google  i have seen  following  command ;
    SQL> Select count(1) from user_tables where table_name not like '%$%' /
      COUNT(1)
             but i dont understand  what  '%$%'  indicates ?
    Thanks all ;

    Hello Everyone ;
    How can i find total no fo  tables/index/m.views in my database ?
    when i  google  i have seen  following  command ;
    SQL> Select count(1) from user_tables where table_name not like '%$%' /
      COUNT(1)
             but i dont understand  what  '%$%'  indicates ?
    Thanks all ;
    consider to simply Read The Fine Manual YOURSELF!
    Oracle Database Search Results: like

  • BWA Fact Table Index Size

    Hi
    Can anybody tell me how the BWA decides when a fact table index gets split into multiple parts? We have a number of very large cubes that are indexed and some have a fact table index that consists of one logical index which is made up of multiple physical indexes but other, similar sized cubes, just have one very large physical index for the fact table.
    With the one very large physical index we seem to get an overload problem but when they are split into multiple parts we don't.
    Thanks
    Martin

    Hi Martin,
    this depends on the reorg config and the attribute of the index. You can manually trigger a splitting of an index via command 'ROUNDROBIN x', x stand for the number of parts which the index will be split to. Therefore you have to go into trexadmin standalone tool -> landscape right click on index -> split/merge index...
    If you want an automatically split, you have to setup your reorg settings. Goto trexadmin standalone tool -> tab reorg -> options -> here you can choose the type of algorithm. Have a look into note 1313260 and 1163149.
    Do you have a scheduled reorg job?
    Regards,
    Jens
    PS: Every black box can be understood...

  • WBS and NPLNR for Vendor Items in BSIK and BSAK  Table

    Hi  FI Experts,
    I created a PR for Network  . While creating PO for the PR  the network values are flowing into  PS_PSP_PNR and NPLNR of EKKN fields  .
    While doing a MIGO also the WBS and NPLNR are flowing to MSEG table  appropriate fields .
    While doing a MIRO transaction for PO   the vendor line item  posted in BSIK table populated with  neither WBS nor NPLNR (Network).
    When  payment is made for Invoice the clearing document(Payment Document)  from BSAK table should be populated with either WBS or NPLNR .
    Could you  please suggest if I need to manually run some transaction to get them Popluated .
    All the above helps me in writing a Vendor and Project wise outstanding balances report .
    Thanks in Advance ..
    Regards,
    Kishore.S

    Hi Srinivas,
    The minimun field required to make a vendor posting are as follows,
            wa_vendoritem-itemno_acc  = gv_count.
            wa_vendoritem-vendor_no    =  wa_vendor-newko.
            wa_vendoritem-item_text     = wa_vendor-sgtxt.
            wa_vendoritem-comp_code  = wa_vendor-bukrs.
            wa_vendoritem-pmnttrms     = wa_vendor-zterm.
            wa_vendoritem-bline_date   = wa_vendor-zfbdt.
            wa_vendoritem-item_text    = wa_vendor-sgtxt.
            wa_vendoritem-tax_code    = wa_vendor-mwskz.
            wa_vendoritem-profit_ctr     = wa_vendor-prctr.
    I think you missed the profir centre field which is mandatory for a vendor posting,or if is a new gl, it will derive the profit centre from the cost centre of the previous line(i.e. G/L line).  if it is not a new G/l , then you need to manually find the profit centre from cost centre and put the values. So double check passing these field , it should be working. Still have doubts please contact me.
    regards,
    Shobana.K
    Edited by: Shobana k on Jan 8, 2009 8:05 AM
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:01 PM

  • Problem with table-indexes when using select-options in select

    Hello experts,
    is it right that table-indexes will not be used if you take select-options to select data from the database?
    in detail:
    i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
    e.g.:    SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
    Now i startet the test with select-options
    e.g.:   SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA  AND keyb IN seltabB AND keyc IN seltabC.
    First of all i just filled the seltabs with only 1 value:    eg:  seltabA=      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'     etc.
    Everything worked fine. Every key of the index was used.
    But now, I putted more than one entries in the seltabs e.g.
    seltabA:      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '2'   
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '3'
    From now on, the indexed was not used completely (with all keys).
    Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
    Thanks a lot,
    Marcel

    Hi Hermann,
    i hope this helps:
    this is the first one, which uses the complete index:
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND    
      "STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
      "STATUS" = ? )  WITH UR                 
    RESULT: 5 IXSCAN /dbcon/01_con05 #key columns:  4
    And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns:  4):
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND        
      "KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR 
      "STATUS" = ? OR "STATUS" = ? )  WITH UR                                  
    and here the access-plan
       0 SELECT STATEMENT ( Estimated Costs =  5,139E+01 [timerons] )                                                                               
    5     1 RETURN                                                                               
    5     2 NLJOIN                                                                               
    5     3 [O] TBSCAN                                                                               
    5     4 SORT                                                                               
    5 TBSCAN GENROW                                                                               
    5     6 <i> FETCH /dbcon/01_con                                                                               
    7 IXSCAN /dbcon/01_con05 #key columns:  2   
    As you can see, only 2 keys were taken for indexed selection!
    Any idea?
    Kind regards,
    MArcel
    Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM

Maybe you are looking for

  • Purchased movies not shown in itunes (but on Apple TV and iPhone 6)

    Hello, I bought some movies on apple tv and they are shown correctly on iPhone 6 (iOS 8.1.2) and Apple TV 3. But I can't see them (the movies library is shown empty) in iTunes 12 on my MacBook Air (mid 2012, Yosemite 10.10.1). My music is shown corre

  • Ipod touch 5th gen, gets stuck on apple logo.HELP!

    I guess I will just start from the beginning. FIRST OF ALL I HAVE ALREADY TRIED RECOVERY AND RESETTING PLEASE DO NOT SAY THAT! My iPod touch 5th generation was dead and i left it dead for a day or so before recharging it, I just hadn't gotten around

  • Address book access sluggish

    Having many problems in TB 31.1.2. Selecting an email address from address book used to be very FAST; type in a couple of letters and hit enter. Now there is a distinct and long pause before the selection appears after typing in a couple of letters.

  • How to solve 'An error occurred while backing up this iPad (-35)' when trying to update to IOS 5?

    My iPad (first generation) is currently on 4.3.5.  I have been trying to upgrade it to IOS 5 several times since IOS 5 release but keep on getting the following messages: I press CONTINUE and get: and MORE INFORMATION gives me http://support.apple.co

  • Problem with Material Master upload

    Hi All, I want to know what the file MTVFP( Group Check Availability) filed gonna do in material master upload bapi "BAPI_MATERIAL_SAVEDATA". When i am trying to upload data i am getting the following error "The field MARC-MTVFP/BAPI_MARC-AVAILCHECK