SELECT-OPTIONS 'EQ' vs. 'BT' performance issue

Hi Experts,
I have a query which uses select-options feature for a date range...
If we give a single date, the report runs instantly but if we use the date range it takes forever to get the reports even though both the low and high dates are the same....
We had informix earlier and it ran smoothly but now that we are on Oracle we are seeing this issue....
I am just trying to understand the performance issues with using the 'BT' clause compared to the 'EQ' clause...
Any inputs are appreaciated...
Thanks

Run the SELECT both ways (with high and low date the same for the second one), and in ST05, do a performance trace on each. Then use the 'explain' function to see if both are using the index.
Rob

Similar Messages

  • Select-options in perform

    If I am passing a SELECT-OPTIONS to a FORM (PERFORM routine not SmartForms) what would be the "structure" for it in the FORM? I am assuming one passes these as tables.
    Thanks.
    Nic

    Hi,
    Try this..
    SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR.
    PERFORM TEST USING SO_MATNR[].
    FORM TEST USING LT_MATNR LIKE SO_MATNR[].
    ENDFORM.
    Thanks,
    Naren

  • Performance issues in Proxy-XI-Jdbc scenario

    Hello,
    I have developed a proxy to JDBC synchronous scenario.
    My scenario works like this.
    *i run an abap program which calls a client proxy,
    the proxy fetches the data from database table and returns the data in the ABAP program.(select query)
    there are serious performance issues when we are running the report
    it is taking around 2-5 minutes and at times multiple users are logged in , it takes around 5-20 minutes.
    it seems that most of the time is consumed in the data fetching.
    please help me to find some solution so that we can fine tune the performance on the PI side.
    Are there any options on JDBC CC which can help  us in making the queries faster
    thanks
    kannu.

    Kanu16 ,
    Issue seems to be at r/3 end..
    1. Make sur ethat report program is using select query in proper fashion .
    2. avoid using nested loops.
    3.  Hope not much validations are being done on selected data .
    Abaper can help you optimizing this .
    By debugging you can find out the exact reason behind.
    Regards ,

  • Populating multiple entries in the select option of a Report

    Hi,
      Ineed to populate multiple entries in the select option of a report where the bdctab has more entries than the number of rows in the select option. I have tried the transaction LINS ( Insert row) but it works intermittently based on the RSSEL-LOW(xx) value. Looking forward to any inputs.
    cheers
    Aveek

    Hi,
      Here is my code dump:
    **Version 0005
    *CTS D7AK900899 New Version code fixed for testaveek28 case.
    *MOD-1887120: Code that is changed after the release of transport.
    Populate the general selection criteria on first screen
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
    ' '  'BDC_CURSOR'                  'EXT_PROD-LOW',
      ' '  'BDC_OKCODE'                  '=%011',
    ' '  'BDC_OKCODE'                  '=DUMMY',
      ' '  'PLVERS'                      '000',
      ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'SIM'                         space,
      ' '  'P_LOGDEL'                    '5'.
      sort it_core_prod by pcode.
      delete adjacent duplicates from it_core_prod
                       comparing pcode.
      describe table it_core_prod lines lv_line.
      CLEAR lv_count.
    LOOP AT it_core_prod ASSIGNING <lfs_data>.
       lv_count = 1.
       CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
         PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-pcode,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
    ENDLOOP.
    *Populate the select options screen for product
    PERFORM f_populate_bdc_tab USING:
    'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB 3010SCREEN_HEADER',
    ' '  'BDC_OKCODE'                  '=ACPT'.
    sort it_prod_var by pcode prvar.
    delete adjacent duplicates from it_core_prod
                       comparing pcode prvar.
    PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000'.
    LOOP AT it_core_prod ASSIGNING <lfs_data>.
      lv_pcode = <lfs_data>-pcode.
    *lv_count = lv_count + 1.
      lv_count = 1.
      CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
          PERFORM f_populate_bdc_tab USING:
          'X'  'SAPLALDB'                    '3000',
          ' '  lv_fname                    <lfs_data>-pcode,
          ' '  'BDC_OKCODE'                  '=LINS'.
          CLEAR lv_fname.
      describe table it_prod_var lines lv_line.
    sort <lfs_data> by locno pcode prvar.
      LOOP AT it_prod_var ASSIGNING <lfs_data1>  where pcode = lv_pcode.
      lv_count = lv_count + 1.
        lv_count = 1.
        CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
          PERFORM f_populate_bdc_tab USING:
          'X'  'SAPLALDB'                    '3000',
          ' '  lv_fname                    <lfs_data1>-prvar,
          ' '  'BDC_OKCODE'                  '=LINS'.
        else.
         PERFORM f_populate_bdc_tab USING:
         ' '  lv_fname                    <lfs_data>-prvar,
         ' '  'BDC_OKCODE'                  '=LINS'.
        endif.
          CLEAR lv_fname.
      ENDLOOP.
    ENDLOOP.
    Populate the select options screen for product
      PERFORM f_populate_bdc_tab USING:
    'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB  3010SCREEN_HEADER',
      ' '  'BDC_OKCODE'                  '=ACPT'.
    Populate the select options for the Locations
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
    ' '  'BDC_CURSOR'                  'EXT_PRD-LOW',
      ' '  'BDC_OKCODE'                  '=%012',
      ' '  'PLVERS'                      '000',
    ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'SIM'                         space,
      ' '  'P_LOGDEL'                    '5'.
    Populate the select options screen for product
      PERFORM f_populate_bdc_tab USING:
      'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB  3010SCREEN_HEADER',
      ' '  'BDC_OKCODE'                  '=ACPT'.
      CLEAR lv_count.
      LOOP AT it_loc_data ASSIGNING <lfs_data>.
        lv_count = lv_count + 1.
      lv_count = 1.
        CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
        PERFORM f_populate_bdc_tab USING:
        ' '  lv_fname                    <lfs_data>-locno.
       ' '  'BDC_OKCODE'                  '=LINS'.
        CLEAR lv_fname.
        PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-locno,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
      ENDLOOP.
    CLEAR lv_count.
    LOOP AT it_loc_data ASSIGNING <lfs_data>.
       lv_count = 1.
       CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-locno,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
    ENDLOOP.
    Populate the objects to be deleted on first screen
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
      ' '  'BDC_OKCODE'                  '=DUMMY',
      ' '  'PLVERS'                      '000',
      ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'MO_STAT'                     'X',
      ' '  'PO_DEL'                      'X',
      ' '  'SL_DEL'                      'X',
      ' '  'ST_DEL'                      'X',
      ' '  'PIR_DEL'                     'X',
      ' '  'SIM'                         space,
      PERFORM f_populate_bdc_tab USING:
      'X'  'SAPLSPO1'                    '0500',
      ' '  'BDC_OKCODE'                  '=OPT1'.
    **Version 0005
    *CTS D7AK900899 New Version code fixed for testaveek28 case.
    *MOD-1887120: Code that is changed after the release of transport.
    Populate the general selection criteria on first screen
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
    ' '  'BDC_CURSOR'                  'EXT_PROD-LOW',
      ' '  'BDC_OKCODE'                  '=%011',
    ' '  'BDC_OKCODE'                  '=DUMMY',
      ' '  'PLVERS'                      '000',
      ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'SIM'                         space,
      ' '  'P_LOGDEL'                    '5'.
      sort it_core_prod by pcode.
      delete adjacent duplicates from it_core_prod
                       comparing pcode.
      describe table it_core_prod lines lv_line.
      CLEAR lv_count.
    LOOP AT it_core_prod ASSIGNING <lfs_data>.
       lv_count = 1.
       CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
         PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-pcode,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
    ENDLOOP.
    *Populate the select options screen for product
    PERFORM f_populate_bdc_tab USING:
    'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB 3010SCREEN_HEADER',
    ' '  'BDC_OKCODE'                  '=ACPT'.
    sort it_prod_var by pcode prvar.
    delete adjacent duplicates from it_core_prod
                       comparing pcode prvar.
    PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000'.
    LOOP AT it_core_prod ASSIGNING <lfs_data>.
      lv_pcode = <lfs_data>-pcode.
    *lv_count = lv_count + 1.
      lv_count = 1.
      CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
          PERFORM f_populate_bdc_tab USING:
          'X'  'SAPLALDB'                    '3000',
          ' '  lv_fname                    <lfs_data>-pcode,
          ' '  'BDC_OKCODE'                  '=LINS'.
          CLEAR lv_fname.
      describe table it_prod_var lines lv_line.
    sort <lfs_data> by locno pcode prvar.
      LOOP AT it_prod_var ASSIGNING <lfs_data1>  where pcode = lv_pcode.
      lv_count = lv_count + 1.
        lv_count = 1.
        CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       if lv_line > 1.
          PERFORM f_populate_bdc_tab USING:
          'X'  'SAPLALDB'                    '3000',
          ' '  lv_fname                    <lfs_data1>-prvar,
          ' '  'BDC_OKCODE'                  '=LINS'.
        else.
         PERFORM f_populate_bdc_tab USING:
         ' '  lv_fname                    <lfs_data>-prvar,
         ' '  'BDC_OKCODE'                  '=LINS'.
        endif.
          CLEAR lv_fname.
      ENDLOOP.
    ENDLOOP.
    Populate the select options screen for product
      PERFORM f_populate_bdc_tab USING:
    'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB  3010SCREEN_HEADER',
      ' '  'BDC_OKCODE'                  '=ACPT'.
    Populate the select options for the Locations
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
    ' '  'BDC_CURSOR'                  'EXT_PRD-LOW',
      ' '  'BDC_OKCODE'                  '=%012',
      ' '  'PLVERS'                      '000',
    ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'SIM'                         space,
      ' '  'P_LOGDEL'                    '5'.
    Populate the select options screen for product
      PERFORM f_populate_bdc_tab USING:
      'X'  'SAPLALDB'                    '3000',
    ' '  'BDC_SUBSCR'                  'SAPLALDB  3010SCREEN_HEADER',
      ' '  'BDC_OKCODE'                  '=ACPT'.
      CLEAR lv_count.
      LOOP AT it_loc_data ASSIGNING <lfs_data>.
        lv_count = lv_count + 1.
      lv_count = 1.
        CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
        PERFORM f_populate_bdc_tab USING:
        ' '  lv_fname                    <lfs_data>-locno.
       ' '  'BDC_OKCODE'                  '=LINS'.
        CLEAR lv_fname.
        PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-locno,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
      ENDLOOP.
    CLEAR lv_count.
    LOOP AT it_loc_data ASSIGNING <lfs_data>.
       lv_count = 1.
       CONCATENATE gc_rscsel gc_l_brac lv_count gc_r_brac INTO lv_fname.
       PERFORM f_populate_bdc_tab USING:
         'X'  'SAPLALDB'                    '3000',
         ' '  lv_fname                    <lfs_data>-locno,
         ' '  'BDC_OKCODE'                  '=LINS'.
         CLEAR lv_fname.
    ENDLOOP.
    Populate the objects to be deleted on first screen
      PERFORM f_populate_bdc_tab USING:
      'X'  'APO_BAPI_DEL_TRANS_OBJECTS'  '1000',
      ' '  'BDC_OKCODE'                  '=DUMMY',
      ' '  'PLVERS'                      '000',
      ' '  'MD_SYS'                      p_log,
      ' '  'EXTRB'                       'X',
      ' '  'MO_DEL'                      'X',
      ' '  'MO_STAT'                     'X',
      ' '  'PO_DEL'                      'X',
      ' '  'SL_DEL'                      'X',
      ' '  'ST_DEL'                      'X',
      ' '  'PIR_DEL'                     'X',
      ' '  'SIM'                         space,
      PERFORM f_populate_bdc_tab USING:
      'X'  'SAPLSPO1'                    '0500',
      ' '  'BDC_OKCODE'                  '=OPT1'.
      CLEAR gv_msg_error.
      lv_ctu_params-nobinpt = space.
    lv_ctu_params-dismode = gc_mode_e.
      lv_ctu_params-dismode = 'A'.
      lv_ctu_params-updmode = 'S'.
      lv_ctu_params-racommit = 'X'.
    Call Transaction /SAPAPO/BP2
    CALL TRANSACTION gc_bp2 USING ct_bdc_data
    OPTIONS FROM lv_ctu_params
    MESSAGES INTO lt_msg_tab.

  • Performance issue when a Direct I/O option is selected

    Hello Experts,
    One of my customers has a performance issue when a Direct I/O option is selected. Reports that there was increase in memory usage when Direct I/O storage option is selected when compared to Buffered I/O option.
    There are two applications on the server of type BSO. When using Buffered I/O, experienced a high level of Read and Write I/O's. Using Direct I/O reduces the Read and Write I/O's, but dramatically increases memory usage.
    Other Information -
    a) Environment Details
    HSS - 9.3.1.0.45, AAS - 9.3.1.0.0.135, Essbase - 9.3.1.2.00 (64-bit)
    OS: Microsoft Windows x64 (64-bit) 2003 R2
    b) What is the memory usage when Buffered I/O and Direct I/O is used? How about running calculations, database restructures, and database queries? Do these processes take much time for execution?
    Application 1: Buffered 700MB, Direct 5GB
    Application 2: Buffered 600MB to 1.5GB, Direct 2GB
    Calculation times may increase from 15 minutes to 4 hours. Same with restructure.
    c) What is the current Database Data cache; Data file cache and Index cache values?
    Application 1: Buffered (Index 80MB, Data 400MB), Direct (Index 120MB; Data File 4GB, Data 480MB).
    Application 2: Buffered (Index 100MB, Data 300MB), Direct (Index 700MB, Data File 1.5GB, Data 300MB)
    d) What is the total size of the ess0000x.pag files and ess0000x.ind files?
    Application 1: Page File 20GB, Index 1.7GB.
    Application 2: Page 3GB, index 700MB.
    Any suggestions on how to improve the performance when Direct I/O is selected? Any performance documents relating to above scenario would be of great help.
    Thanks in advance.
    Regards,
    Sudhir

    Sudhir,
    Do you work at a help desk or are you a consultant? you ask such a varied range of questions I think the former. If you do work at a help desk, don't you have a next level support that could help you? If you are a consultant, I suggest getting together with another consultant that actually knows more. You might also want to close some of your questions,. You have 24 open and perhaps give points to those that helped you.

  • Performance Issue with Selection Screen Values

    Hi,
    I am facing a performance issue(seems like a performance issue ) in my project.
    I have a query with some RKFs and sales area in filters (single value variable which is optional).
    Query is by default  restricted by current month.
    The Cube on which the query operates has around 400,000 records for a month.
    The Cube gets loaded every three hours
    When I run the query with no filters I get the output within 10~15 secs.
    The issue I am facing is that,  when I enter a sales area in my selection screen the query gets stuck in the data selection step. In fact we are facing the same problem if we use one or two other characteristics in our selection screen
    We have aggregates/indexes etc on our cube.
    Has any one faced a similar situation?
    Does any one have any comments on this ?
    Your help will be appreciated. Thanks

    Hi A R,
    Goto RSRT--> Give ur query anme --> Execute =Debug
    --> No a pop up ill come with many check boxes select "Display Aggregates found" option --> now give ur
    selections in variable screen > first it will give the already existing aggregate names> continue> now after displaying all the aggregates it will display the list of objects realted to cube wise> try to copy these objects into notepad> again go with ur drill downs now u'll get the already existing aggregates for this drill down-> it will display the list of objects> copy them to notepad> now sort all the objects related to one cube by deleting duplicate objects in the note pad>goto that Infocube> context>maintain aggregates> create aggregate on the objects u copied into note pad.
    now try to execyte the report... it should work properly with out delays for those selections.
    I hope it helps you...
    Regards,
    Ramki.

  • Performance issues with respect scheme registration,select & insert query

    I am facing performance issues with respect to schema registration,Select & insert query towards 10.2.0.3 version.It is taking around 45 minutes to register schema and it is taking around 5 min to insert a single document into xml db where as it was taking less than min to insert a single document into xml db of 9.2.0.6 version.Would like to know the issue and solution to resolve this issue.Please help me out on this as it is very urgent for me

    Since it appears that this is an XML DB specific question, you're probably better off posting in the XML DB. The folks over there have much more experience with the ins and outs of that particular product.
    Justin

  • Multi Select Choice on af:query has severe performance issue

    Multi-select choice used with af:query through a view criteria is causing severe performance issue on deselection of "All" checkbox, if the data in the list is around 550 rows. The same component works absolutely fine when used in a form layout.
    I can provide you a re-producible test case, if anyone needs it!
    ***: This is a customer environment issue, and customer is eager to have multi-select in this case. Appreciate any help!

    Glimpse of repetitive lines from console for the above scenario:
    <DCUtil> <findSpelObject> [2208] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for TestSelectChoiceDefaultAMDataControl
    <ADFLogger> <begin> Attaching an iterator binding to a datasource
    <DCIteratorBinding> <getViewObject> [2209] Resolving VO:TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1 for iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_59List_60
    <DCUtil> <findSpelObject> [2210] DCUtil, RETURNING: <null> for TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <ADFLogger> <addContextData> Get LOV list
    <ADFLogger> <begin> Get LOV list
    <DCUtil> <findSpelObject> [2211] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for TestSelectChoiceDefaultAMDataControl
    <ADFLogger> <begin> Attaching an iterator binding to a datasource
    <DCIteratorBinding> <getViewObject> [2212] Resolving VO:TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1 for iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_123List_124
    <DCUtil> <findSpelObject> [2213] DCUtil, RETURNING: <null> for TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <ADFLogger> <addContextData> Get LOV list
    .....many times followed by
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <ADFLogger> <addContextData> Get LOV list
    <ADFLogger> <begin> Get LOV list
    <ADFLogger> <addContextData> Get LOV list
    <ADFLogger> <begin> Get LOV list
    <ADFLogger> <addContextData> Get LOV list
    <ADFLogger> <begin> Get LOV list
    <ADFLogger> <addContextData> Get LOV list
    <ADFLogger> <begin> Get LOV list
    ...many times

  • Performance issue when using select count on large tables

    Hello Experts,
    I have a requirement where i need to get count of data  from a database table.Later on i need to display the count in ALV format.
    As per my requirement, I have to use this select count inside a nested loops.
    Below is the count snippet:
    LOOP at systems assigning <fs_sc_systems>.
    LOOP at date assigning <fs_sc_date>.
    SELECT COUNT( DISTINCT crmd_orderadm_i~header )
       FROM crmd_orderadm_i
       INNER JOIN bbp_pdigp
           ON crmd_orderadm_iclient EQ bbp_pdigpclient               "MANDT is referred as client
         AND crmd_orderadm_iguid  EQ bbp_pdigpguid
         INTO w_sc_count
    WHERE crmd_orderadm_i~created_at BETWEEN <fs_sc_date>-start_timestamp
         AND <fs_sc_date>-end_timestamp
         AND bbp_pdigp~zz_scsys   EQ <fs_sc_systems>-sys_name.
    endloop.
    endloop.
    In the above code snippet,
    <fs_sc_systems>-sys_name is having the system name,
    <fs_sc_date>-start_timestamp is having the start date of month
    and <fs_sc_date>-end_timestamp is the end date of month.
    Also the data in tables crmd_orderadm_i and bbp_pdigp is very large and it increases every day.
    Now,the above select query is taking a lot of time to give the count due to which i am facing performance issues.
    Can any one pls help me out to optimize this code.
    Thanks,
    Suman

    Hi Choudhary Suman ,
    Try this:
    SELECT crmd_orderadm_i~header
      INTO it_header                 " interna table
      FROM crmd_orderadm_i
    INNER JOIN bbp_pdigp
        ON crmd_orderadm_iclient EQ bbp_pdigpclient
       AND crmd_orderadm_iguid   EQ bbp_pdigpguid
       FOR ALL ENTRIES IN date
    WHERE crmd_orderadm_i~created_at BETWEEN date-start_timestamp
                                          AND date-end_timestamp
       AND bbp_pdigp~zz_scsys EQ date-sys_name.
        SORT it_header BY header.
        DELETE ADJACENT DUPLICATES FROM it_header
        COMPARING header.
        describe table it_header lines v_lines.
    Hope this information is help to you.
    Regards,
    José

  • Select List Performance Issue in Apex 3.1.2

    Hi
    It would of great help if you could suggest us for the following
    We are facing some issues in Select List performance in Apex 3.1.2 version.
    We have 6 select list and all have been cascaded i.e., values of each select list based on pervious list value.
    Values in each select list are huge. Because of this, the performance is very slow.
    It takes huge time to fetch the data based on other list values.
    We cross verified in backend, the same query takes less time compared to the Application.
    Any recommedation to fine tune this?
    Thanks in advance
    Vijay

    if your select lists are very huge then it could be the browser that is causing the slow down.
    try and create an example using a static HTML file containing a select list of the same size and you may find the same performance issue.
    a quick way to create the test would be to save the source of your APEX page as a html file
    Craig
    [http://www.oracleapplicationexpress.com]

  • Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query

    Hi All,
    There is a Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query in a report painter.
    This query is working fine when executed in 4.7 system where as it is running for more time in ECC6.0.
    Select query is on the table COSP.
    SELECT (FIELD_LIST)
            INTO CORRESPONDING FIELDS OF TABLE I_COSP PACKAGE SIZE 1000
            FROM  COSP CLIENT SPECIFIED
            WHERE GJAHR IN SELR_GJAHR
              AND KSTAR IN SELR_KSTAR
              AND LEDNR EQ '00'
              AND OBJNR IN SELR_OBJNR
              AND PERBL IN SELR_PERBL
              AND VERSN IN SELR_VERSN
              AND WRTTP IN SELR_WRTTP
              AND MANDT IN MANDTTAB
            GROUP BY (GROUP_LIST).
       LOOP AT I_COSP      .
         COSP                           = I_COSP      .
         PERFORM PCOSP       USING I_COSP-_COUNTER.
         CLEAR: $RWTAB, COSP                          .
         CLEAR CCR1S                         .
       ENDLOOP.
    ENDSELECT.
    I have checked with the table indexes, they were same as in 4.7 system.
    What can be the reson for the difference in execution time. How can this be reduced without adjusting the select query.
    Thanks in advance for the responses.
    Regards,
    Dedeepya.

    Hi,
    ohhhhh....... lots of problems in select query......this is not the way you should write it.
    Some generic comments:
    1. never use SELECT
                       endselect.
       SELECT
      into table
       for all entries in table
      where.
       use perform statment after this selection.
    2. Do not use into corresponding fields. use exact structure type.
    3. use proper sequence of fields in the where condition so that it helps table go according to indexes.
        e.g in your case
              sequence should be
    LEDNR
    OBJNR
    GJAHR
    WRTTP
    VERSN
    KSTAR
    HRKFT
    VRGNG
    VBUND
    PARGB
    BEKNZ
    TWAER
    PERBL
    sequence should be same as defined in table.
    Always keep select query as simple as possible and perform all other calculations etc. afterwords.
    I hope it helps.
    Regards,
    Pranaya

  • Performance issue while selecting material documents MKPF & MSEG

    Hello,
    I'm facing performance issues in production while selecting Material documents for Sales order and item based on the Sales order Stock.
    Here is the query :
    I'm first selecting data from ebew table which is the Sales order Stock table then this query.
        IF ibew[] IS NOT INITIAL AND ignore_material_documents IS INITIAL.
    *     Select the Material documents created for the the sales orders.
          SELECT mkpf~mblnr mkpf~budat
                 mseg~matnr mseg~mat_kdauf mseg~mat_kdpos mseg~shkzg
                 mseg~dmbtr mseg~menge
           INTO  CORRESPONDING FIELDS OF TABLE i_mseg
           FROM  mkpf INNER JOIN mseg
           ON    mkpf~mandt = mseg~mandt
           AND   mkpf~mblnr = mseg~mblnr
           AND   mkpf~mjahr = mseg~mjahr
           FOR   ALL entries IN ibew
           WHERE mseg~matnr      = ibew-matnr
           AND   mseg~werks         = ibew-bwkey
           AND   mseg~mat_kdauf   = ibew-vbeln
           AND   mseg~mat_kdpos  = ibew-posnr.
          SORT i_mseg BY mat_kdauf ASCENDING
                         mat_kdpos ASCENDING
                         budat     DESCENDING.
        ENDIF.
    I need to select the material documents because the end users want to see the stock as on certain date for the sales orders and only material document lines can give this information. Also EBEW table gives Stock only for current date.
    For Example :
    If the report was run for Stock date 30th Sept 2008, but  on the 5th Oct 2008, then I need to consider the goods movements after 30th Sept and add if stock was issued or subtract if stock was added.
    I know there is an Index MSEG~M in database system on mseg, however I don't know the Storage location LGORT and Movement types BWART that should be considered, so I tried to use all the Storage locations and Movement types available in the system, but this caused the query to run even slower than before.
    I could create an index for the fields mentioned in where clause , but it would be an overhead anyways.
    Your help will be appreciated. Thanks in advance
    regards,
    Advait

    Hi Thomas,
    Thanks for your reply. the performance of the query has significantly improved than before after switching the join from mseg join mkpf.
    Actually, I even tried without join and looped using field symbols ,this is working slightly faster than the switched join.
    Here are the result ,  tried with 371 records as our sandbox doesn't have too many entries unfortunately ,
    Results before switching the join  146036 microseconds
    Results after swithing the join        38029 microseconds
    Results w/o join                           28068 microseconds for selection and 5725 microseconds for looping
    Thanks again.
    regards,
    Advait

  • Performance issues related to logging (ForceSingleTraceFile option)

    Dear SDN members,
    I have a question about logging.
    I like to place my logs/traces for every application in different log files. By doing this you have to set the ForceSingleTraceFile option to NO (in the config tool).
    But in a presentation of SAP, named SAP Web Application Server 6.40; SAP Logging and Tracing API, is stated:
    - All traces by default go to the default trace file.
         - Good for performance
              - On production systems, this is a must!!!
    - Hard to find your trace messages
    - Solution: Configure development systems to pipe traces and logs for applications to their own specific trace file
    But I want the logs/traces also by our customers (production systems) in separate files. So my question is:
    What are the performance issues we face, if we turn the ForceSingleTraceFile option to NO by our customers?
    and
    If we turn the ForceSingleTraceFile to NO will the logs/traces of the SAP applications also go to different files? If so, then I can imagine that it will be difficult to find the logs of the different SAP applications.
    I hope that someone can clarify the working of the ForceSingleTraceFile setting.
    Kind regards,
    Marinus Geuze

    Dear Marinus,
    The performance issues with extensive logging are related to high memory usage (for concatenation/generation of the messages which are written to the log files) and as result increased garbare collection frequency, as well as high disk I/O and CPU overhead for the actual logging.
    Writing to same trace file, if logging is extensive can become a bottleneck.
    Anyway it is not related to if you should write the logs to the default trace of a standard location. I believe that the recommendation in the documentation is just about using the standard logging APIs of the SAP Java Server, because they are well optimized.
    Best regards,
    Sylvia

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Performance Issue on Select Condition on KNA1 table

    Hi,
    I am facing problem when i am selecting from the table KNA1 for given account group and attribute9 it is taking lot of time .
    Please suggest the select query or any other feasible soln to solve this problem
    select
    kunnr
    kotkd
    from kna1
    where kunnr eq parameter value and
    kotkd eq 'ZPY' and katr9 = 'L' or 'T'.
    Firstly i am using in in katr9 then i removed dur to performance issue using read further please suggest further performanace soln

    Hi,
    The select should be like:
    select
    kunnr
    kotkd
    from kna1
    where kunnr eq parameter value
        and kotkd eq 'ZPY'
         and katr9 in r_katr9. "  'L' or 'T'.
    create a range for katr9 like r_katr9 with L or T.
    Because while selecting the entries from KNA1, it will check for KATR9 = L and then KATR9 = T.
    Hope the above statement is useful for you.
    Regards,
    Shiva.

Maybe you are looking for