Program  performance

Hi,
I have a complex program that is going to multiple tables and hence the program is very very slow. How can i find out which select statement is taking the longest time?
Vartika.

See the help files regarding SE30 for a full explanation.
The short version is this.  All you really need to do is go to SE30 and execute your program from there.  Once you get the output, green arrow back until you get back to SE30.  Now you should be able to click the Evaluate button at the bottom.  Once you get to the next screen, click the Hit List button for a full breakdown of where the time was spent.  This will report selects, function calls, etc.
I usually prefer to sort it by the Net time, so I can see the big concerns right at the top.  You can even get to the ABAP code by putting your cursor on a row and clicking the Display Source Code button.

Similar Messages

  • ABAP Programs Performance Tuning and Web Services

    Hi,
    Can anyone give me any good material link or eBook on SAP ABAP programs Performance Tuning. What are the things that needs to be done for performance tuning etc..
    Also, any material or simple eBook on web services.
    my email is [email protected]
    Thanks a ton in advance.
    Swetha.

    Check this link ABAP Development  Performance Tuning
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/performance%2btuning
    Check these threads.
    How do you take care of performance issues in your ABAP programs?
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bd335c111d1829f0000e829fbfe/frameset.htm

  • Report program Performance problem

    Hi All,
       one object is taking 30hr for executing.some one develped this in 1998 but this time it is a big Performance problem.please some one helep what to do i am giving that code.
    *--DOCUMENTATION--
    Programe written by :  31.03.1998 .
    Purpose : this programe updates the car status into the table zsdtab1
    This programe is to be schedule in the backgroud periodically .
    Querries can be fired on the table zsdtab1 to get the details of the
        Car .
    This programe looks at the changes made in the material master from
    last updated date and the new entries in material master and updates
    the tables zsdtab1 .
    Changes in the Sales Order are not taken into account .
    To get a fresh data set the value of zupddate in table ZSTATUS as
    01.01.1998 . All the data will be refreshed from that date .
    Program Changed on 23/7/2001 after version upgrade 46b by jyoti
    Addition of New tables for Ibase
    tables used -
    tables : mara ,                        " Material master
             ausp ,                        " Characteristics table .
             zstatus ,                     " Last updated status table .
             zsdtab1 ,    " Central database table to be maintained .
             vbap ,                        " Sales order header table .
             vbak ,                        " Sales order item table .
             kna1 ,                        " Customer master .
             vbrk ,
             vbrp ,
             bkpf ,
             bseg ,
             mseg ,
             mkpf ,
             vbpa ,
             vbfa ,
             t005t .                         " Country details tabe .
    --NEW TABLES ADDEDFOR VERSION 4.6B--
    tables :   ibsymbol ,ibin , ibinvalues .
    data : vatinn like ibsymbol-atinn , vatwrt like ibsymbol-atwrt ,
           vatflv like ibsymbol-atflv .
    *--types definition--
    types : begin of mara_itab_type ,
               matnr like mara-matnr ,
               cuobf like mara-cuobf ,
            end of mara_itab_type ,
            begin of ausp_itab_type ,
               atinn like ausp-atinn ,
               atwrt like ausp-atwrt ,
               atflv like ausp-atflv ,
            end of ausp_itab_type .
    data : mara_itab type mara_itab_type occurs 500 with header line ,
           zsdtab1_itab like zsdtab1 occurs 500 with header line ,
           ausp_itab type ausp_itab_type occurs 500 with header line ,
           last_date type d ,
           date type d .
    data: length type i.
    clear mara_itab . refresh mara_itab .
    clear zsdtab1_itab . refresh zsdtab1_itab .
    select single  zupddate into last_date from zstatus
           where programm = 'ZSDDET01' .
    select matnr cuobf into (mara_itab-matnr , mara_itab-cuobf) from mara
          where mtart eq 'FERT' or mtart = 'ZCBU'.
        where MATNR IN MATERIA
         and ERSDA IN C_Date
         and MTART in M_TYP.
        append mara_itab .
    endselect .
    loop at mara_itab.
    clear zsdtab1_itab .
    zsdtab1_itab-commno = mara_itab-matnr .
       Get the detailed data into internal table ausp_itab .----------->>>
    clear ausp_itab . refresh ausp_itab .
    --change starts--
    select atinn atwrt atflv into (ausp_itab-atinn , ausp_itab-atwrt ,
                               ausp_itab-atflv) from ausp
          where objek = mara_itab-matnr .
          append ausp_itab .
       endselect .
       clear ausp_itab .
    select  atinn  atwrt atflv  into (ausp_itab-atinn , ausp_itab-atwrt ,
    ausp_itab-atflv) from ibin as a inner join ibinvalues as b
                      on ain_recno = bin_recno
           inner join  ibsymbol as c
                      on bsymbol_id = csymbol_id
        where a~instance = mara_itab-cuobf  .
      append ausp_itab .
    endselect .
    ----CHANGE ENDS HERE -
    sort ausp_itab by atwrt.
    loop at ausp_itab .
    clear date .
    case ausp_itab-atinn .
      when '0000000094' .
        zsdtab1_itab-model = ausp_itab-atwrt .  " model  .
      when '0000000101' .
        zsdtab1_itab-drive = ausp_itab-atwrt .  " drive
      when '0000000095' .
        zsdtab1_itab-converter = ausp_itab-atwrt . "converter
      when '0000000096' .
        zsdtab1_itab-transmssn = ausp_itab-atwrt . "transmission
      when '0000000097' .
        zsdtab1_itab-colour = ausp_itab-atwrt .    "colour
      when '0000000098' .
        zsdtab1_itab-ztrim = ausp_itab-atwrt .     "trim
      when '0000000103' .
    *=========Sujit 14-Mar-2006
       IF AUSP_ITAB-ATWRT(3) EQ 'WDB' OR AUSP_ITAB-ATWRT(3) EQ 'WDD'
       OR AUSP_ITAB-ATWRT(3) EQ 'WDC' OR AUSP_ITAB-ATWRT(3) EQ 'KPD'.
           ZSDTAB1_ITAB-CHASSIS_NO = AUSP_ITAB-ATWRT+3(14).
       ELSE.
           ZSDTAB1_ITAB-CHASSIS_NO = AUSP_ITAB-ATWRT .     "chassis no
       ENDIF.
        zsdtab1_itab-chassis_no = ausp_itab-atwrt .     "chassis no
    *=========14-Mar-2006
      when '0000000166' .
    ----25.05.04
      length = strlen( ausp_itab-atwrt ).
      if length < 15.                       "***aded by patil
       zsdtab1_itab-engine_no = ausp_itab-atwrt .     "ENGINE NO
      else.
    zsdtab1_itab-engine_no = ausp_itab-atwrt+13(14)."Aded on 21.05.04 patil
      endif.
    ----25.05.04
      when '0000000104' .
        zsdtab1_itab-body_no = ausp_itab-atwrt .     "BODY NO
      when '0000000173' .                                          "21.06.98
        zsdtab1_itab-cockpit = ausp_itab-atwrt .     "COCKPIT NO . "21.06.98
      when '0000000102' .
        zsdtab1_itab-dest = ausp_itab-atwrt .     "destination
      when '0000000105' .
        zsdtab1_itab-airbag = ausp_itab-atwrt .     "AIRBAG
      when '0000000110' .
        zsdtab1_itab-trailer_no = ausp_itab-atwrt .     "TRAILER_NO
      when '0000000109' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-fininspdat = date .   "FIN INSP DATE
      when '0000000108' .
        zsdtab1_itab-entrydate = ausp_itab-atwrt .     "ENTRY DATE
      when '0000000163' .
        zsdtab1_itab-regist_no = ausp_itab-atwrt .     "REGIST_NO
      when '0000000164' .
        zsdtab1_itab-mech_key = ausp_itab-atwrt .     "MECH_KEY
      when '0000000165' .
        zsdtab1_itab-side_ab_rt = ausp_itab-atwrt .     "SIDE_AB_RT
      when '0000000171' .
        zsdtab1_itab-side_ab_lt = ausp_itab-atwrt .     "SIDE_AB_LT
      when '0000000167' .
        zsdtab1_itab-elect_key = ausp_itab-atwrt .     "ELECT_KEY
      when '0000000168' .
        zsdtab1_itab-head_lamp = ausp_itab-atwrt .     "HEAD_LAMP
      when '0000000169' .
        zsdtab1_itab-tail_lamp = ausp_itab-atwrt .     "TAIL_LAMP
      when '0000000170' .
        zsdtab1_itab-vac_pump = ausp_itab-atwrt .     "VAC_PUMP
      when '0000000172' .
        zsdtab1_itab-sd_ab_sn_l = ausp_itab-atwrt .     "SD_AB_SN_L
      when '0000000174' .
        zsdtab1_itab-sd_ab_sn_r = ausp_itab-atwrt .     "SD_AB_SN_R
      when '0000000175' .
        zsdtab1_itab-asrhydunit = ausp_itab-atwrt .     "ASRHYDUNIT
      when '0000000176' .
        zsdtab1_itab-gearboxno = ausp_itab-atwrt .     "GEARBOXNO
      when '0000000177' .
        zsdtab1_itab-battery = ausp_itab-atwrt .     "BATTERY
      when '0000000178' .
        zsdtab1_itab-tyretype = ausp_itab-atwrt .     "TYRETYPE
      when '0000000179' .
        zsdtab1_itab-tyremake = ausp_itab-atwrt .     "TYREMAKE
      when '0000000180' .
        zsdtab1_itab-tyresize = ausp_itab-atwrt .     "TYRESIZE
      when '0000000181' .
        zsdtab1_itab-rr_axle_no = ausp_itab-atwrt .     "RR_AXLE_NO
      when '0000000183' .
        zsdtab1_itab-ff_axl_nor = ausp_itab-atwrt .     "FF_AXLE_NO_rt
      when '0000000182' .
        zsdtab1_itab-ff_axl_nol = ausp_itab-atwrt .     "FF_AXLE_NO_lt
      when '0000000184' .
        zsdtab1_itab-drivairbag = ausp_itab-atwrt .     "DRIVAIRBAG
      when '0000000185' .
        zsdtab1_itab-st_box_no = ausp_itab-atwrt .     "ST_BOX_NO
      when '0000000186' .
        zsdtab1_itab-transport = ausp_itab-atwrt .     "TRANSPORT
      when '0000000106' .
        zsdtab1_itab-trackstage = ausp_itab-atwrt .  " tracking stage
      when '0000000111' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_1 = date .    " tracking date for 1.
      when '0000000112' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_5 = date .    " tracking date for 5.
      when '0000000113' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_10 = date .   "tracking date for 10
      when '0000000114' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_15 = date .   "tracking date for 15
      when '0000000115' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_20 = date .   " tracking date for 20
      when '0000000116' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_25 = date .   " tracking date for 25
      when '0000000117' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_30 = date .   "tracking date for 30
      when '0000000118' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_35 = date .   "tracking date for 35
      when '0000000119' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_40 = date .   " tracking date for 40
      when '0000000120' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_45 = date .   " tracking date for 45
      when '0000000121' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_50 = date .   "tracking date for 50
      when '0000000122' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_55 = date .   "tracking date for 55
      when '0000000123' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_60 = date .   " tracking date for 60
      when '0000000124' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_65 = date .   " tracking date for 65
      when '0000000125' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_70 = date .   "tracking date for 70
      when '0000000126' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_75 = date .   "tracking date for 75
      when '0000000127' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_78 = date .   " tracking date for 78
      when '0000000203' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_79 = date .   " tracking date for 79
      when '0000000128' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_80 = date .   " tracking date for 80
      when '0000000129' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_85 = date .   "tracking date for 85
      when '0000000130' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_90 = date .   "tracking date for 90
      when '0000000131' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dat_trk_95 = date .   "tracking date for 95
      when '0000000132' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dattrk_100 = date .   " tracking date for100
      when '0000000133' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dattrk_110 = date .   " tracking date for110
      when '0000000134' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dattrk_115 = date .   "tracking date for 115
      when '0000000135' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dattrk_120 = date .   "tracking date for 120
      when '0000000136' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-dattrk_105 = date .   "tracking date for 105
      when '0000000137' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_1 = date .     "plan trk date for 1
      when '0000000138' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_5 = date .     "plan trk date for 5
      when '0000000139' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_10 = date .    "plan trk date for 10
      when '0000000140' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_15 = date .    "plan trk date for 15
      when '0000000141' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_20 = date .    "plan trk date for 20
      when '0000000142' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_25 = date .    "plan trk date for 25
      when '0000000143' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_30 = date .    "plan trk date for 30
      when '0000000144' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_35 = date .    "plan trk date for 35
      when '0000000145' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_40 = date .    "plan trk date for 40
      when '0000000146' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_45 = date .    "plan trk date for 45
      when '0000000147' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_50 = date .    "plan trk date for 50
      when '0000000148' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_55 = date .    "plan trk date for 55
      when '0000000149' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_60 = date .    "plan trk date for 60
      when '0000000150' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_65 = date .    "plan trk date for 65
      when '0000000151' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_70 = date .    "plan trk date for 70
      when '0000000152' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_75 = date .    "plan trk date for 75
      when '0000000153' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_78 = date .    "plan trk date for 78
      when '0000000202' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_79 = date .    "plan trk date for 79
      when '0000000154' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_80 = date .    "plan trk date for 80
      when '0000000155' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_85 = date .    "plan trk date for 85
      when '0000000156' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_90 = date .    "plan trk date for 90
      when '0000000157' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_95 = date .    "plan trk date for 95
      when '0000000158' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_100 = date .   "plan trk date for 100
      when '0000000159' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_105 = date .   "plan trk date for 105
      when '0000000160' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_110 = date .   "plan trk date for 110
      when '0000000161' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_115 = date .   "plan trk date for 115
      when '0000000162' .
        perform date_convert using  ausp_itab-atflv changing date .
        zsdtab1_itab-pdt_tk_120 = date .   "plan trk date for 120
    ********Additional fields / 24.05.98**********************************
      when '0000000099' .
        case ausp_itab-atwrt .
          when '540' .
            zsdtab1_itab-roll_blind = 'X' .
          when '482' .
            zsdtab1_itab-ground_clr = 'X' .
          when '551' .
            zsdtab1_itab-anti_theft = 'X' .
          when '882' .
            zsdtab1_itab-anti_tow = 'X' .
          when '656' .
            zsdtab1_itab-alloy_whel = 'X' .
          when '265' .
            zsdtab1_itab-del_class = 'X' .
          when '280' .
            zsdtab1_itab-str_wheel = 'X' .
          when 'CDC' .
            zsdtab1_itab-cd_changer = 'X' .
          when '205' .
            zsdtab1_itab-manual_eng = 'X' .
          when '273' .
            zsdtab1_itab-conn_handy = 'X' .
          when '343' .
            zsdtab1_itab-aircleaner = 'X' .
          when '481' .
            zsdtab1_itab-metal_sump = 'X' .
          when '533' .
            zsdtab1_itab-speaker = 'X' .
          when '570' .
            zsdtab1_itab-arm_rest = 'X' .
          when '580' .
            zsdtab1_itab-aircond = 'X' .
          when '611' .
            zsdtab1_itab-exit_light = 'X' .
          when '613' .
            zsdtab1_itab-headlamp = 'X' .
          when '877' .
            zsdtab1_itab-readlamp = 'X' .
          when '808' .
            zsdtab1_itab-code_ckd = 'X' .
          when '708' .
            zsdtab1_itab-del_prt_lc = 'X' .
          when '593' .
            zsdtab1_itab-ins_glass = 'X' .
          when '955' .
            zsdtab1_itab-zelcl = 'Elegance' .
          when '593' .
            zsdtab1_itab-zelcl = 'Classic' .
        endcase .
    endcase .
    endloop .
    *--Update the sales data .--
    perform get_sales_order using mara_itab-matnr .
    perform get_cartype using mara_itab-matnr .
    append zsdtab1_itab .
    endloop.
    <<<
    loop at zsdtab1_itab .
      if zsdtab1_itab-cartype <> 'W-203'
      or zsdtab1_itab-cartype <> 'W-210'
      or zsdtab1_itab-cartype <> 'W-211'.
          clear zsdtab1_itab-zelcl.
      endif.
    SELECT SINGLE * FROM ZSDTAB1 WHERE COMMNO = MARA_ITAB-MATNR .
    select single * from zsdtab1 where commno = zsdtab1_itab-commno.
    if sy-subrc <> 0 .
        insert into zsdtab1 values zsdtab1_itab .
    else .
        update zsdtab1 set :vbeln = zsdtab1_itab-vbeln
                       bill_doc = zsdtab1_itab-bill_doc
                       dest = zsdtab1_itab-dest
                       lgort = zsdtab1_itab-lgort
                       ship_tp = zsdtab1_itab-ship_tp
                       country = zsdtab1_itab-country
                       kunnr = zsdtab1_itab-kunnr
                       vkbur = zsdtab1_itab-vkbur
                       customer = zsdtab1_itab-customer
                       city   = zsdtab1_itab-city
                       region = zsdtab1_itab-region
                       model = zsdtab1_itab-model
                       drive = zsdtab1_itab-drive
                       converter = zsdtab1_itab-converter
                       transmssn = zsdtab1_itab-transmssn
                       colour = zsdtab1_itab-colour
                       ztrim = zsdtab1_itab-ztrim
                       commno = zsdtab1_itab-commno
                       trackstage = zsdtab1_itab-trackstage
                       chassis_no    =   zsdtab1_itab-chassis_no
                       engine_no     =   zsdtab1_itab-engine_no
                       body_no       =   zsdtab1_itab-body_no
                       cockpit       =   zsdtab1_itab-cockpit
                       airbag        =   zsdtab1_itab-airbag
                       trailer_no    =   zsdtab1_itab-trailer_no
                       fininspdat    =   zsdtab1_itab-fininspdat
                       entrydate     =   zsdtab1_itab-entrydate
                       regist_no     =   zsdtab1_itab-regist_no
                       mech_key      =   zsdtab1_itab-mech_key
                       side_ab_rt    =   zsdtab1_itab-side_ab_rt
                       side_ab_lt    =   zsdtab1_itab-side_ab_lt
                       elect_key     =   zsdtab1_itab-elect_key
                       head_lamp     =   zsdtab1_itab-head_lamp
                       tail_lamp     =   zsdtab1_itab-tail_lamp
                       vac_pump      =   zsdtab1_itab-vac_pump
                       sd_ab_sn_l    =   zsdtab1_itab-sd_ab_sn_l
                       sd_ab_sn_r    =   zsdtab1_itab-sd_ab_sn_r
                       asrhydunit    =   zsdtab1_itab-asrhydunit
                       gearboxno     =   zsdtab1_itab-gearboxno
                       battery       =   zsdtab1_itab-battery
                       tyretype      =   zsdtab1_itab-tyretype
                       tyremake      =   zsdtab1_itab-tyremake
                       tyresize      =   zsdtab1_itab-tyresize
                       rr_axle_no    =   zsdtab1_itab-rr_axle_no
                       ff_axl_nor    =   zsdtab1_itab-ff_axl_nor
                       ff_axl_nol    =   zsdtab1_itab-ff_axl_nol
                       drivairbag    =   zsdtab1_itab-drivairbag
                       st_box_no     =   zsdtab1_itab-st_box_no
                       transport     =   zsdtab1_itab-transport
    OPTIONS-
                       roll_blind    = zsdtab1_itab-roll_blind
                       ground_clr    = zsdtab1_itab-ground_clr
                       anti_theft    = zsdtab1_itab-anti_theft
                       anti_tow      = zsdtab1_itab-anti_tow
                       alloy_whel    = zsdtab1_itab-alloy_whel
                       del_class     = zsdtab1_itab-del_class
                       str_wheel     = zsdtab1_itab-str_wheel
                       cd_changer    = zsdtab1_itab-cd_changer
                       manual_eng    = zsdtab1_itab-manual_eng
                       conn_handy    = zsdtab1_itab-conn_handy
                       aircleaner    = zsdtab1_itab-aircleaner
                       metal_sump    = zsdtab1_itab-metal_sump
                       speaker       = zsdtab1_itab-speaker
                       arm_rest      = zsdtab1_itab-arm_rest
                       aircond       = zsdtab1_itab-aircond
                       exit_light    = zsdtab1_itab-exit_light
                       headlamp      = zsdtab1_itab-headlamp
                       readlamp      = zsdtab1_itab-readlamp
                       code_ckd      = zsdtab1_itab-code_ckd
                       del_prt_lc    = zsdtab1_itab-del_prt_lc
                       ins_glass     = zsdtab1_itab-ins_glass
                       dat_trk_1 = zsdtab1_itab-dat_trk_1
                       dat_trk_5 = zsdtab1_itab-dat_trk_5
                       dat_trk_10 = zsdtab1_itab-dat_trk_10
                       dat_trk_15 = zsdtab1_itab-dat_trk_15
                       dat_trk_20 = zsdtab1_itab-dat_trk_20
                       dat_trk_25 = zsdtab1_itab-dat_trk_25
                       dat_trk_30 = zsdtab1_itab-dat_trk_30
                       dat_trk_35 = zsdtab1_itab-dat_trk_35
                       dat_trk_40 = zsdtab1_itab-dat_trk_40
                       dat_trk_45 = zsdtab1_itab-dat_trk_45
                       dat_trk_50 = zsdtab1_itab-dat_trk_50
                       dat_trk_55 = zsdtab1_itab-dat_trk_55
                       dat_trk_60 = zsdtab1_itab-dat_trk_60
                       dat_trk_65 = zsdtab1_itab-dat_trk_65
                       dat_trk_70 = zsdtab1_itab-dat_trk_70
                       dat_trk_75 = zsdtab1_itab-dat_trk_75
                       dat_trk_78 = zsdtab1_itab-dat_trk_78
                       dat_trk_79 = zsdtab1_itab-dat_trk_79
                       dat_trk_80 = zsdtab1_itab-dat_trk_80
                       dat_trk_85 = zsdtab1_itab-dat_trk_85
                       dat_trk_90 = zsdtab1_itab-dat_trk_90
                       dat_trk_95 = zsdtab1_itab-dat_trk_95
                       dattrk_100 = zsdtab1_itab-dattrk_100
                       dattrk_105 = zsdtab1_itab-dattrk_105
                       dattrk_110 = zsdtab1_itab-dattrk_110
                       dattrk_115 = zsdtab1_itab-dattrk_115
                       dattrk_120 = zsdtab1_itab-dattrk_120
                       pdt_tk_1 = zsdtab1_itab-pdt_tk_1
                       pdt_tk_5 = zsdtab1_itab-pdt_tk_5
                       pdt_tk_10 = zsdtab1_itab-pdt_tk_10
                       pdt_tk_15 = zsdtab1_itab-pdt_tk_15
                       pdt_tk_20 = zsdtab1_itab-pdt_tk_20
                       pdt_tk_25 = zsdtab1_itab-pdt_tk_25
                       pdt_tk_30 = zsdtab1_itab-pdt_tk_30
                       pdt_tk_35 = zsdtab1_itab-pdt_tk_35
                       pdt_tk_40 = zsdtab1_itab-pdt_tk_40
                       pdt_tk_45 = zsdtab1_itab-pdt_tk_45
                       pdt_tk_50 = zsdtab1_itab-pdt_tk_50
                       pdt_tk_55 = zsdtab1_itab-pdt_tk_55
                       pdt_tk_60 = zsdtab1_itab-pdt_tk_60
                       pdt_tk_65 = zsdtab1_itab-pdt_tk_65
                       pdt_tk_70 = zsdtab1_itab-pdt_tk_70
                       pdt_tk_75 = zsdtab1_itab-pdt_tk_75
                       pdt_tk_78 = zsdtab1_itab-pdt_tk_78
                       pdt_tk_79 = zsdtab1_itab-pdt_tk_79
                       pdt_tk_80 = zsdtab1_itab-pdt_tk_80
                       pdt_tk_85 = zsdtab1_itab-pdt_tk_85
                       pdt_tk_90 = zsdtab1_itab-pdt_tk_90
                       pdt_tk_95 = zsdtab1_itab-pdt_tk_95
                       pdt_tk_100 = zsdtab1_itab-pdt_tk_100
                       pdt_tk_105 = zsdtab1_itab-pdt_tk_105
                       pdt_tk_110 = zsdtab1_itab-pdt_tk_110
                       pdt_tk_115 = zsdtab1_itab-pdt_tk_115
                       pdt_tk_120 = zsdtab1_itab-pdt_tk_120
                       cartype = zsdtab1_itab-cartype
                       zelcl = zsdtab1_itab-zelcl
                       excise_no = zsdtab1_itab-excise_no
    where commno = zsdtab1_itab-commno .
       Update table .---------<<<
    endif .
    endloop .
    perform update_excise_date .
    perform update_post_goods_issue_date .
    perform update_time.
    *///////////////////// end of programe /////////////////////////////////
    Get sales data -
    form get_sales_order using matnr .
      data : corr_vbeln like vbrk-vbeln .
    ADDED BY ADITYA / 22.06.98 **************************************
    perform get_order using matnr .
    select single vbeln lgort into (zsdtab1_itab-vbeln , zsdtab1_itab-lgort)
                from vbap where matnr = matnr .   " C-22.06.98
                  from vbap where vbeln = zsdtab1_itab-vbeln .
      if sy-subrc = 0 .
    ************Get the Excise No from Allocation Field*******************
        select single * from zsdtab1 where commno = matnr .
        if zsdtab1-excise_no =  '' .
          select * from vbrp where matnr = matnr .
            select single vbeln into corr_vbeln from vbrk where
            vbeln = vbrp-vbeln and vbtyp = 'M'.
            if sy-subrc eq 0.
              select single * from vbrk where vbtyp = 'N'
              and sfakn = corr_vbeln.      "cancelled doc.
              if sy-subrc ne 0.
                select single * from vbrk where vbeln = corr_vbeln.
                if sy-subrc eq 0.
                  data : year(4) .
                  move sy-datum+0(4) to year .
      select single * from bkpf where awtyp = 'VBRK' and awkey = vbrk-vbeln
                                      and  bukrs = 'MBIL' and gjahr = year .
                  if sy-subrc = 0 .
      select single * from bseg where bukrs = 'MBIL' and belnr = bkpf-belnr
                                       and gjahr = year and koart = 'D' and
                                                               shkzg = 'S' .
                    zsdtab1_itab-excise_no = bseg-zuonr .
                  endif .
                endif.
              endif.
            endif.
          endselect.
        endif .
        select single kunnr vkbur into (zsdtab1_itab-kunnr ,
                zsdtab1_itab-vkbur) from vbak
                where vbeln = zsdtab1_itab-vbeln .
        if sy-subrc = 0 .
          select single name1 ort01 regio into (zsdtab1_itab-customer ,
             zsdtab1_itab-city , zsdtab1_itab-region) from kna1
             where kunnr = zsdtab1_itab-kunnr .
        endif.
      Get Ship to Party **************************************************
        select single * from vbpa where vbeln = zsdtab1_itab-vbeln and
                        parvw = 'WE' .
        if sy-subrc = 0 .
            zsdtab1_itab-ship_tp = vbpa-kunnr .
      Get Destination Country of Ship to Party .************
            select single * from kna1 where kunnr = vbpa-kunnr .
            if sy-subrc = 0 .
               select single * from t005t where land1 = kna1-land1
                                       and spras = 'E' .
               if sy-subrc = 0 .
                   zsdtab1_itab-country = t005t-landx .
               endif .
            endif .
        endif .
      endif .
    endform.                               " GET_SALES
    form update_time.
      update zstatus set zupddate = sy-datum
                         uzeit = sy-uzeit
      where programm = 'ZSDDET01' .
    endform.                               " UPDATE_TIME
    *&      Form  DATE_CONVERT
    form date_convert using atflv changing date .
      data : dt(8) , dat type i .
      dat = atflv .
      dt = dat .
      date = dt .
    endform.                               " DATE_CONVERT
    *&      Form  UPDATE_POST_GOODS_ISSUE_DATE
    form update_post_goods_issue_date .
      types : begin of itab1_type ,
                mblnr like mseg-mblnr ,
                budat like mkpf-budat ,
              end of itab1_type .
      data : itab1 type itab1_type occurs 10 with header line .
      loop at mara_itab .
        select single * from zsdtab1 where commno = mara_itab-matnr .
        if sy-subrc =  0  and zsdtab1-postdate =  '00000000' .
          refresh itab1 . clear itab1 .
        select * from mseg where matnr = mara_itab-matnr and bwart = '601' .
            itab1-mblnr = mseg-mblnr .
            append itab1 .
          endselect .
          loop at itab1 .
            select single * from mkpf where mblnr = itab1-mblnr .
            if sy-subrc = 0 .
              itab1-budat = mkpf-budat .
              modify itab1 .
            endif .
          endloop .
          sort itab1 by budat .
          read table itab1 index 1 .
          if sy-subrc = 0 .
            update zsdtab1 set postdate = itab1-budat
                         where commno = mara_itab-matnr .
          endif .
        endif .
      endloop .
    endform.                               " UPDATE_POST_GOODS_ISSUE_DATE
    *&      Form  UPDATE_EXCISE_DATE
    form update_excise_date.
      types : begin of itab2_type ,
                mblnr like mseg-mblnr ,
                budat like mkpf-budat ,
              end of itab2_type .
      data : itab2 type itab2_type occurs 10 with header line .
      loop at mara_itab .
        select single * from zsdtab1 where commno = mara_itab-matnr .
        if sy-subrc =  0  and zsdtab1-excise_dat  = '00000000' .
          refresh itab2 . clear itab2 .
          select * from mseg where matnr = mara_itab-matnr and
                                  (  bwart = '601' or  bwart = '311' ) .
            itab2-mblnr = mseg-mblnr .
            append itab2 .
          endselect .
          loop at itab2 .
            select single * from mkpf where mblnr = itab2-mblnr .
            if sy-subrc = 0 .
              itab2-budat = mkpf-budat .
              modify itab2 .
            endif .
          endloop .
          sort itab2 by budat .
          read table itab2 index 1 .
          if sy-subrc = 0 .
            update zsdtab1 set excise_dat = itab2-budat
                         where commno = mara_itab-matnr .
          endif .
        endif .
      endloop .
    endform.                               " UPDATE_EXCISE_DATE
    form get_order using matnr .
    types :  begin of itab_type ,
                vbeln like vbap-vbeln ,
                posnr like vbap-posnr ,
             end of itab_type .
    data : itab type itab_type occurs 10 with header line .
    refresh itab . clear itab .
    select * from vbap where matnr = mara_itab-matnr .
       itab-vbeln = vbap-vbeln .
       itab-posnr = vbap-posnr .
       append itab .
    endselect .
    loop at itab .
      select single * from vbak where vbeln = itab-vbeln .
      if vbak-vbtyp <> 'C' .
        delete itab .
      endif .
    endloop .
    loop at itab .
    select single * from vbfa where vbelv = itab-vbeln and
             posnv = itab-posnr and vbtyp_n = 'H' .
    if sy-subrc = 0 .
      delete itab .
    endif .
    endloop .
    clear :  zsdtab1_itab-vbeln ,  zsdtab1_itab-bill_doc .
    loop at itab .
      zsdtab1_itab-vbeln = itab-vbeln .
      select single * from vbfa where vbelv = itab-vbeln and
             posnv = itab-posnr and vbtyp_n = 'M' .
    if sy-subrc = 0 .
      zsdtab1_itab-bill_doc = vbfa-vbeln .
    endif .
    endloop .
    endform .
    *&      Form  GET_CARTYPE
    form get_cartype using matnr .
    select single * from mara where matnr = matnr .
    zsdtab1_itab-cartype = mara-satnr .
    endform.                    " GET_CARTYPE

    Hi,
    I have analysed your program and i would like to share following points for better performance of this report :
    (a)  Use the field Names instead of Select * or Select Single * as if you use the field names it will consume less amount of resources inside the loop as well as you have lot many Select Single * and u r using very big tables like VBAP and many more.
    (b) Trace on ST05 which particular query is mostly effecting your system or use ST12 in current mode to trace for less inputs which run the report for 20-30 min so that we get an idea which queries are effecting the system and taking a lot of time.
    (c) In Case of internal tables sort the data properly and use binary search for getting the data.
    I think this will help.
    Thanks and Regards,
    Harsh

  • Concurrent program performance Issue

    Hi,
    We are currently experiencing performance issue in one of the concurrent program related
    to the HR module. The concurrent request is currently completing in 3 hrs time.
    We have obtained a trace for the concurrent program.
    Please help me analyze the cause of the performance issue from the trace file.
    Trace file below:
    BEGIN SLC_PYINF_USMONACCROH_PKG.SLC_421_HANDLE_OUTBOUND(:errbuf,:rc,:A0,:A1,
    :A2,:A3,:A4,:A5,:A6,:A7,:A8,:A9,:A10,:A11); END;
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 76.08 9602.16 700828 1330818 663813 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 76.08 9602.16 700828 1330818 663813 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 3 0.00 0.00
    SQL*Net message from client 3 0.00 0.00
    PL/SQL lock timer 969 9.83 9485.16
    UPDATE HRAPPS.SLC_PYINF_USMONACCRO_STG SET PROCESS_STATUS = 2
    WHERE
    CONC_REQUEST_ID = :B2 AND SET_SEQUENCE_NUM = :B1 AND PROCESS_STATUS = 1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 24.83 45.67 145127 695479 602714 560730
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 24.83 45.67 145127 695479 602714 560730
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    0 UPDATE SLC_PYINF_USMONACCRO_STG (cr=684898 pr=134556 pw=0 time=44759708 us)
    1135266 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=694708 pr=124937 pw=0 time=6874212 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 15622 1.43 13.94
    db file sequential read 25578 0.52 14.30
    latch: cache buffers lru chain 3 0.00 0.00
    DELETE FROM SLC_PYINF_USMONACCRO_ARC
    WHERE
    EXTRACT_DATE<TRUNC(SYSDATE)-60
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 7.41 15.05 87598 87668 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 7.41 15.06 87598 87668 0 0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    0 DELETE SLC_PYINF_USMONACCRO_ARC (cr=87668 pr=87598 pw=0 time=15053606 us)
    0 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_ARC (cr=87668 pr=87598 pw=0 time=15053595 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 3 0.00 0.00
    db file scattered read 11025 0.61 13.21
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 2 10.14 10.23 116633 123540 0 2
    total 6 10.14 10.23 116633 123540 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=58317 pw=0 time=5290475 us)
    560730 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=58317 pw=0 time=1689204 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 15646 0.27 6.24
    db file sequential read 625 0.00 0.01
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1 AND
    PROCESS_STATUS = 2
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 5.20 8.32 51482 69842 0 1
    total 3 5.20 8.32 51482 69842 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=69842 pr=51482 pw=0 time=8323369 us)
    560730 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=69842 pr=51482 pw=0 time=2811304 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 6514 0.30 6.09
    db file sequential read 114 0.00 0.02
    SELECT MAX(SET_SEQUENCE_NUM)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 5.34 6.63 58318 61770 0 1
    total 3 5.34 6.63 58318 61770 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=58318 pw=0 time=6639527 us)
    560730 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=58318 pw=0 time=2250410 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 7820 0.30 4.46
    db file sequential read 313 0.00 0.05
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B2 AND
    SET_SEQUENCE_NUM = :B1 AND PROCESS_STATUS = 1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 4.99 4.88 58315 61770 0 1
    total 3 4.99 4.88 58315 61770 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=58315 pw=0 time=4887337 us)
    560730 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=58315 pw=0 time=1688451 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 7824 0.00 3.02
    db file sequential read 313 0.00 0.00
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1 AND
    PROCESS_STATUS = 1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 4.98 4.87 58318 61770 0 1
    total 3 4.98 4.87 58318 61770 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=58318 pw=0 time=4872548 us)
    560730 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=58318 pw=0 time=1688407 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 7821 0.00 2.98
    db file sequential read 312 0.00 0.00
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1 AND
    PROCESS_STATUS = -1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 4.45 4.36 58317 61770 0 1
    total 3 4.45 4.36 58317 61770 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=58317 pw=0 time=4369473 us)
    0 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=58317 pw=0 time=4369425 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 7823 0.00 2.98
    db file sequential read 312 0.00 0.00
    SELECT COUNT(*)
    FROM
    HRAPPS.SLC_PYINF_USMONACCRO_STG WHERE CONC_REQUEST_ID = :B1 AND
    PROCESS_STATUS < 0
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 4.14 4.24 51481 61770 0 1
    total 3 4.14 4.24 51481 61770 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=61770 pr=51481 pw=0 time=4243020 us)
    0 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_STG (cr=61770 pr=51481 pw=0 time=4242968 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 6537 0.06 2.90
    db file sequential read 104 0.00 0.00
    DELETE FROM SLC_PYINF_USMONACCRO_GLI_ARC
    WHERE
    EXTRACT_DATE<TRUNC(SYSDATE)-60
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.63 2.52 7681 7689 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.63 2.52 7681 7689 0 0
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    0 DELETE SLC_PYINF_USMONACCRO_GLI_ARC (cr=7689 pr=7681 pw=0 time=2521592 us)
    0 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_GLI_ARC (cr=7689 pr=7681 pw=0 time=2521583 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 1 0.00 0.00
    db file scattered read 976 1.00 2.36
    UPDATE HRAPPS.SLC_PYINF_USMONACCRO_GLI_STG SET PROCESS_STATUS = 2
    WHERE
    CONC_REQUEST_ID = :B1 AND PROCESS_STATUS = 1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 1.89 2.25 5863 16125 60963 52309
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 1.89 2.25 5863 16125 60963 52309
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    0 UPDATE SLC_PYINF_USMONACCRO_GLI_STG (cr=11787 pr=1273 pw=0 time=1332023 us)
    122679 TABLE ACCESS FULL SLC_PYINF_USMONACCRO_GLI_STG (cr=16291 pr=5859 pw=0 time=48501241 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 745 0.01 0.76
    db file parallel read 1 0.00 0.00
    db file sequential read 5 0.00 0.00
    SELECT B.ATTRIBUTE1 ,B.ATTRIBUTE2 ,B.ATTRIBUTE3 ,T.FLEX_VALUE_MEANING ,
    T.DESCRIPTION
    FROM
    FND_FLEX_VALUES_TL T ,FND_FLEX_VALUES B WHERE B.FLEX_VALUE_ID =
    T.FLEX_VALUE_ID AND T.LANGUAGE = USERENV ('LANG') AND TRIM(UPPER
    (B.FLEX_VALUE)) = TRIM(UPPER (:B1 )) AND B.ENABLED_FLAG = 'Y' AND UPPER
    (B.VALUE_CATEGORY) = UPPER ('SLCHR_INTERFACE_CLEANUP')
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 2 0.25 0.86 1640 3286 0 2
    total 5 0.25 0.86 1640 3286 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    2 NESTED LOOPS (cr=3286 pr=1640 pw=0 time=866461 us)
    2 TABLE ACCESS FULL FND_FLEX_VALUES (cr=3280 pr=1637 pw=0 time=848331 us)
    2 TABLE ACCESS BY INDEX ROWID FND_FLEX_VALUES_TL (cr=6 pr=3 pw=0 time=18101 us)
    2 INDEX UNIQUE SCAN FND_FLEX_VALUES_TL_U1 (cr=4 pr=2 pw=0 time=9705 us)(object id 849241)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 4 0.00 0.02
    db file scattered read 208 0.30 0.71
    SELECT PHASE_CODE, STATUS_CODE, COMPLETION_TEXT, PHASE.LOOKUP_CODE,
    STATUS.LOOKUP_CODE, PHASE.MEANING, STATUS.MEANING
    FROM
    FND_CONCURRENT_REQUESTS R, FND_CONCURRENT_PROGRAMS P, FND_LOOKUPS PHASE,
    FND_LOOKUPS STATUS WHERE PHASE.LOOKUP_TYPE = :B3 AND PHASE.LOOKUP_CODE =
    DECODE(STATUS.LOOKUP_CODE, 'H', 'I', 'S', 'I', 'U', 'I', 'M', 'I',
    R.PHASE_CODE) AND STATUS.LOOKUP_TYPE = :B2 AND STATUS.LOOKUP_CODE =
    DECODE(R.PHASE_CODE, 'P', DECODE(R.HOLD_FLAG, 'Y', 'H',
    DECODE(P.ENABLED_FLAG, 'N', 'U', DECODE(SIGN(R.REQUESTED_START_DATE -
    SYSDATE),1,'P', R.STATUS_CODE))), 'R', DECODE(R.HOLD_FLAG, 'Y', 'S',
    DECODE(R.STATUS_CODE, 'Q', 'B', 'I', 'B', R.STATUS_CODE)), R.STATUS_CODE)
    AND (R.CONCURRENT_PROGRAM_ID = P.CONCURRENT_PROGRAM_ID AND
    R.PROGRAM_APPLICATION_ID= P.APPLICATION_ID ) AND REQUEST_ID = :B1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 971 0.25 0.16 0 0 0 0
    Fetch 971 0.53 0.65 0 13605 0 971
    total 1943 0.78 0.81 0 13605 0 971
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    971 TABLE ACCESS BY INDEX ROWID FND_LOOKUP_VALUES (cr=17489 pr=0 pw=0 time=877481 us)
    2913 NESTED LOOPS (cr=16518 pr=0 pw=0 time=1643550 us)
    971 NESTED LOOPS (cr=11663 pr=0 pw=0 time=658551 us)
    971 NESTED LOOPS (cr=5837 pr=0 pw=0 time=95374 us)
    971 TABLE ACCESS BY INDEX ROWID FND_CONCURRENT_REQUESTS (cr=2924 pr=0 pw=0 time=63054 us)
    971 INDEX UNIQUE SCAN FND_CONCURRENT_REQUESTS_U1 (cr=1953 pr=0 pw=0 time=43874 us)(object id 240792)
    971 TABLE ACCESS BY INDEX ROWID FND_CONCURRENT_PROGRAMS (cr=2913 pr=0 pw=0 time=28198 us)
    971 INDEX UNIQUE SCAN FND_CONCURRENT_PROGRAMS_U1 (cr=1942 pr=0 pw=0 time=17956 us)(object id 849182)
    971 TABLE ACCESS BY INDEX ROWID FND_LOOKUP_VALUES (cr=5826 pr=0 pw=0 time=558105 us)
    971 INDEX RANGE SCAN FND_LOOKUP_VALUES_U1 (cr=4855 pr=0 pw=0 time=539171 us)(object id 906518)
    971 INDEX RANGE SCAN FND_LOOKUP_VALUES_U1 (cr=4855 pr=0 pw=0 time=172115 us)(object id 906518)
    SELECT MAX(LT.SECURITY_GROUP_ID)
    FROM
    FND_LOOKUP_TYPES LT WHERE LT.VIEW_APPLICATION_ID = :B2 AND LT.LOOKUP_TYPE =
    :B1 AND LT.SECURITY_GROUP_ID IN (0,
    TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),55,1), ' ', '0', NULL, '0',
    SUBSTRB(USERENV('CLIENT_INFO'),55,10))))
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1945 0.11 0.11 0 0 0 0
    Fetch 1945 0.18 0.10 0 3890 0 1945
    total 3891 0.29 0.21 0 3890 0 1945
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Rows Row Source Operation
    1945 SORT AGGREGATE (cr=3890 pr=0 pw=0 time=142954 us)
    1945 FIRST ROW (cr=3890 pr=0 pw=0 time=96520 us)
    1945 INDEX RANGE SCAN (MIN/MAX) FND_LOOKUP_TYPES_U1 (cr=3890 pr=0 pw=0 time=89938 us)(object id 906517)
    INSERT INTO HRAPPS.SLC_HRINF_INT_SUMMARY (INT_SUMMARY_ID,
    INT_SUMMARY_CREATE_DATE ,INT_SUMMARY_LAST_UPDATE_DATE, INTERFACE_NAME ,
    HANDLER_CONC_REQUEST_ID, INT_CONC_REQUEST_ID ,SET_SEQUENCE_NUMBER,
    SET_RECORD_COUNT, INT_FROM_DATE ,INT_TO_DATE, INT_STATUS_1_STATE,
    INT_STATUS_1_MESSAGE ,INT_STATUS_1_STARTED, INT_STATUS_1_COMPLETED ,
    INT_STATUS_1_SUCCESS_COUNT, INT_STATUS_1_ERROR_COUNT ,INT_STATUS_2_STATE,
    INT_STATUS_2_MESSAGE ,INT_STATUS_2_STARTED, INT_STATUS_2_COMPLETED ,
    INT_STATUS_2_SUCCESS_COUNT, INT_STATUS_2_ERROR_COUNT ,INT_STATUS_3_STATE,
    INT_STATUS_3_MESSAGE ,INT_STATUS_3_STARTED, INT_STATUS_3_COMPLETED ,
    INT_STATUS_3_SUCCESS_COUNT, INT_STATUS_3_ERROR_COUNT ,INT_STATUS_4_STATE,
    INT_STATUS_4_MESSAGE ,INT_STATUS_4_STARTED, INT_STATUS_4_COMPLETED ,
    INT_STATUS_4_SUCCESS_COUNT, INT_STATUS_4_ERROR_COUNT ,INT_STATUS_5_STATE,
    INT_STATUS_5_MESSAGE ,INT_STATUS_5_STARTED, INT_STATUS_5_COMPLETED ,
    INT_STATUS_5_SUCCESS_COUNT, INT_STATUS_5_ERROR_COUNT )
    VALUES
    (:B7 , :B6 , :B6 , :B5 , :B4 , NULL , NULL, NULL, :B3 , :B2 , :B1 , NULL ,
    NULL, NULL , NULL, NULL , :B1 , NULL , NULL, NULL , NULL, NULL , :B1 , NULL
    , NULL, NULL , NULL, NULL , :B1 , NULL , NULL, NULL , NULL, NULL , :B1 ,
    NULL , NULL, NULL , NULL, NULL )
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.01 0.12 12 1 12 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.01 0.12 12 1 12 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 70 (recursive depth: 1)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 12 0.02 0.12
    Thanks & Regards,
    Rup

    Hi;
    Please check our previous topic
    Concurrent manager real time tune
    Oracle apps database
    tune concurrent manager
    Oracle apps database
    Concurrent Manager very slow
    Concurrent Manager very slow........
    Regard
    Helios

  • AFAB program performance different if TEST switch activated

    Hi colleagues,
    We are experiencing a strange performance in AFAB program.
    We have uploaded several assets in a particular company code. When executing AFAB transaction in TEST mode, the new assets are not considered, whereas, when performing a REAL execution yes they are.
    We think that when reconciliating assets at the end of the year, this issue which is not harmful (but strange indeed) may be solved, but we are not sure at all.
    Can anybody provide a clue on what is happening.
    Thanks and my best regards
    Edited by: Patxi Albisu on Oct 28, 2008 11:10 AM
    Edited by: Patxi Albisu on Oct 28, 2008 11:11 AM

    michael483 wrote:
    Clearly I've touched a nerve.Not the one you think. I'm sure you're assuming we're a bunch of Java fanboys because we didn't jump on your bitch session band wagon. On the contrary, we see Java for what it is--a decent general purpose language that has is strengths and weaknesses and is suited for some jobs and not others. The temper tantrum tone of your post is annoying, regardless of the topic.
    HotSpot's optimizer is all-around crap and you all know it,No, I don't know that. What I do know is that I've seen Java code run much faster and more smoothly since the introduction of hotspot, and that it is sufficient for the tasks we've set it on the various projects where I've used it.
    and the best answer you can give is "don't use Java".Well, duh. If a tool doesn't suit the needs of the job at hand, you don't use it, and if you have no choice, then you do what you can to work around it the best you can. This is what professionals do.
    What did you expect as a response to your little hissy rant? Did you really think your post was a good way to try to solve whatever technical or business problem you're encountering?
    Fine, I won't.Wise choice. If nothing else, your blood pressure might come back down.

  • RESTFUL Web Services vs Socket Programming Performance

    Hi guys,
    I will have an application which will have a service serving about to 30 million users/day and a mean of 5 requests/user.
    It means that there will be about 150 million requests per day. I will have two servers behind a load balancer and my clients will be both Java and C++.
    I think to implement RESTFUL Web Services but afraid of performance issues.
    Did you have a knowledge about the performances of web service and socket programming in such a high loaded project?
    Tnx.
    Ayberk

    ayberkcansever wrote:
    Hi guys,
    I will have an application which will have a service serving about to 30 million users/day and a mean of 5 requests/user.
    It means that there will be about 150 million requests per day. I will have two servers behind a load balancer and my clients will be both Java and C++.
    I think to implement RESTFUL Web Services but afraid of performance issues.
    Did you have a knowledge about the performances of web service and socket programming in such a high loaded project?It depends on the CPUs, RAM, disks, and network configurations of those servers.
    It depends on how the requests are distributed throughout the day.
    It depends on how big the requests are and how big the responses are.

  • TCode for abap program performance testing

    Hi
    I have tuned a abap program which was consuming lot of time. I still have the old version with diff name. I would like to know the tcodes where in i could see the performance of the program.
    regards
    Balaji

    Hi balaji,
    This is kiran Kumar.G.I will give some steps.you better to follow those steps to get ur report performance.
    If u r satisfy with my answer give me REWARD POINTS.
                HAVE A NICE DAY.
    STEPS:
    1.OPEN UR REPORT IN SE38 TRANSACTION.
    2.SELECT THE MENU PATH
      UTILITIES-->MORE UTILITIES-->RUNTIME ANALYSIS
    3.SELECT THE PROGRAM RADIO BUTTON AND GIVE UR REPORT NAME THERE.AND CLICK <b>EXECUTE</b> BUTTON
    4.IT WILL TAKE U TO ANOTHER SCREEN THERE U CAN EXECUTE UR REPORT AND COME BACK.
    5.CLICK ON ANALYZE BUTTON.(PRESENT IN BELOW OF THE SCREEN).
    THEN U WILL GET ONE GRAPH
    NOTE:
    1.IF IT IS RED UR PROGRAM IS HAVING VERY POOR PERFORMANCE
    2.IF IT IS GREEN IT IS OK.
    ABAP GRAPH : TELLS UR CODING IN THE REPORT.
    DATABASE  GRAPH : U R RETREIVE DATA FROM DATABASE IN UR REPORT..
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1.     Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2.     Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3.     Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4.     Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5.     Avoid using nested SELECT statement, SELECT within LOOPs.
    6.     Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7.     Avoid using SELECT * and Select only the required fields from the table.
    8.     Avoid nested loops when working with large internal tables.
    9.     Use assign instead of into in LOOPs for table types with large work areas
    10.     When in doubt call transaction SE30 and use the examples and check your code
    11.     Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12.     Use "CHECK" instead of IF/ENDIF whenever possible.
    13.     Use "CASE" instead of IF/ENDIF whenever possible.
    14.     Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING", creates more coding but is more effcient.
    Regards,
    Kiran Kumar.G

  • How to find the program performance

    Hi SAP Gurus,
    I came to know that we can check the object performance with se30 t.code. 
    There we can find all the components performance of the system.
    My question is !
    If the performance is calculate by the request and response time, some times server is in good speed and sometimes in normal speed to execute.  If i execute the same program in both the cases,  Is there any changes in runtime analsys.  If yes how can we find the perfect performance of my object.
    Please give me the answer you will be rewarded with points for the best answer. 
    thanks
    kishore

    Hi kishore,
    ols available in SAP to pin-point a performance problem
    The runtime analysis (SE30)
    SQL Trace (ST05)
    Tips and Tricks tool
    The performance database
    Optimizing the load of the database
    Using table buffering
    Using buffered tables improves the performance considerably. Note that in some cases a stament can not be used with a buffered table, so when using these staments the buffer will be bypassed. These staments are:
    Select DISTINCT 
    ORDER BY / GROUP BY / HAVING clause 
    Any WHERE clasuse that contains a subquery or IS NULL expression 
    JOIN s 
    A SELECT... FOR UPDATE 
    If you wnat to explicitly bypass the bufer, use the BYPASS BUFFER addition to the SELECT clause.
    Use the ABAP SORT Clause Instead of ORDER BY
    The ORDER BY clause is executed on the database server while the ABAP SORT statement is executed on the application server. The datbase server will usually be the bottleneck, so sometimes it is better to move thje sort from the datsbase server to the application server.
    If you are not sorting by the primary key ( E.g. using the ORDER BY PRIMARY key statement) but are sorting by another key, it could be better to use the ABAP SORT stament to sort the data in an internal table. Note however that for very large result sets it might not be a feasible solution and you would want to let the datbase server sort it.
    Avoid ther SELECT DISTINCT Statement
    As with the ORDER BY clause it could be better to avoid using SELECT DISTINCT, if some of the fields are not part of an index. Instead use ABAP SORT + DELETE ADJACENT DUPLICATES on an internal table, to delete duplciate rows.
    Rgds,
    P.Nag

  • How to analyze program performance

    On solaris, I have following stuff.
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode).
    1. To analyse a program, I use "java -d64 -Xms1024m -Xmx7168m -XX:+UseLWPSynchronization -Xrunhprof:file=a.hprof
    ,format=a,cpu=times myprogram". But I get following HPROF error. What they really mean?
    at the begining, this prompts:
    HPROF ERROR: method on stack top != method exiting..
    at the end, following prompt:
    HPROF ERROR: thread local table NULL in method exit 1001e7da8
    HPROF ERROR: thread local table NULL in method exit 1001e7da8
    HPROF ERROR: thread local table NULL in method exit 1001e9678
    HPROF ERROR : stack underflow in method exit
    HPROF ERROR : stack underflow in method exit
    2. I ran a program that currently requires a huge memory, about several GB. What method can I take to bring down this?
    Thanks

    If you looking for a hprof gui then visit
    http://www.pointdefence.net
    I usually recommend
    http://www.hp.com/products1/unix/java/hpjmeter/index.html
    http://java.sun.com/developer/technicalArticles/GUI/perfanal/
    robert

  • Tables storing Program Performance time

    Hi All,
    Can any one tell me the TAbles which store the
    execution time of  proagrams which are runnning daily .
    Regards
    Babu

    Hi Al,
    Not for JOB .
    ABAP programs running in foreground...
    Regards
    babu

  • How to make program eat less memory/enhance performance ?

    Dear experts,
    I have a program that creates 3 tables containing series of line vectors. These are created from data contained in an ascii file. The program performs some calculations on the data. I have everything working perfectly i.e. it creates the tables, does the calculations and gives me the final results which I need (but this only happens when I use a data file that is 88Kb in size).
    However, the frustrating problem I am experiencing currently is that when I use a heavier file e.g size 4.22mb, after a short delay, Windows starts complaining about memory errors and Windows task manager's Mem usage goes through the roof!
    Eventually, I get an Exception in thread ?main? java.lang.OutOfMemoryError <<no stack trace available>> error from the JVM.
    I have tried "java -Xrunhprof" command and it suggests that the real memory hogging line of code is:
    name = ((String) v.elementAt(nj))+"\t"+((String) reference_vec.elementAt(nj));As the program is dynamically allocating and creating a full nxn matrix of the input data lines at run-time that means it is creating zillions of strings at that line? Concatenation of Strings is not a good idea either as this blows performance too. I am thinking of re-writing the program in C. I have run out of ideas. Please can you suggest how I can make some tweaks to the java code so that the program runs more efficiently? Any comments welcome. Program is approx 500 LOC, can post on request.
    d.

    import java.io.*;
    import java.util.*;
              Mobile ID Classification Program - 2003
              Currently known memory bugs -
              15/10/03      -          JVM reports OutOfMemoryError when gsm_data.txt used as input
    public class DataAnalysis {
    /* Data structures used to store values **/
                   private Hashtable Activity = null;
                   private Vector table1 = null;
                   private Vector table2 = null;
                   private Vector table3 = null;
                   private BufferedReader fin;
                   private StringTokenizer st;
         Mobile activity description strings       
         private final String A1 = "IMSI attach";
         private final String A2 = "IMSI detach";
         private final String A3 = "Periodic location update";
         private final String A4 = "Normal location update+authentication";
         private final String A5 = "Service request mobile call";
         private final String A6 = "Service request SMS";
         private final String A7 = "Service request supplementary service activation";
         private final String A8 = "paging response";
         //           private final String A8a = "Paging response+authentication";
         private final String A9 = "Service request energy";
    /*     main function where the program begins execution **/
         public static void main(String args[]) {
                   if(args.length == 0) {
                             System.out.println("File name not specified. Usage : java -Xmx500mb DataAnalysis <file name> ");
              else if(args.length > 1) {
                             System.out.println("Too many parameters. Usage : java -Xmx500mb DataAnalysis <file name> ");
              else {
                                  new DataAnalysis(args[0]);
    /*          Constructor. Takes input file name string as parameter      **/
         public DataAnalysis(String data_file_name) {
                   Activity = new Hashtable();
                                            table1 = new Vector();
                                            table2 = new Vector();
                                            table3 = new Vector();
         //                Parse the input file. Read in lines.
              try{
                   fin= new BufferedReader(new FileReader(data_file_name));
                   String line;
                   while((line = fin.readLine()) != null) {
                        if (line.trim().length() > 0) {
                             tokenize(line);
              catch(Exception e) {
                                  System.out.println(e.getMessage());
              finally {
                   try {
                                  fin.close();                    //       Close the file input stream then 
                   catch(Exception ee) {
                   //           Create the first two tables
                                                           createTable1();
                                                           createTable2();
              //                     Free the memory occupied by table 1
              //                    freeTable(table1);
                        table1 = null;
                                                           createTable3();
                             //                Free the memory occupied by table 2          
                             //                freeTable(table2);
                   table2 = null;
              //                Select all the mobile ids in gsm_data.txt which have a city block distance value less than 0.25 threshold (upper limit)
              System.out.println("--------------------------Table 3 : Relationship between mobile ids using Manhattan City Block distance -------------------------- \n" );
              for(int ni =0;ni<table3.size();ni++) {
                   Vector inner_vec = (Vector) table3.elementAt(ni);
                   for(int nj = 0;nj<(inner_vec.size()-1);nj= nj+2) {
                             float val = ((Float) inner_vec.elementAt(nj)).floatValue();
                             if(val <= 0.25 && val > 0.0)  {                              
                                            System.out.println((String) inner_vec.elementAt(nj+1));
    /*      Returns the index from table 1  **/
         public int getIndexFromTable1(String id) {
              int index = -1;
              for(int ni = 0;ni<table1.size();ni++) {
                   Vector v = (Vector) table1.elementAt(ni);
                   String vect_id = (String) v.elementAt(0);
                   if(vect_id.equalsIgnoreCase(id)) {
                             index = ni;
                             return index;
                        Create table with actual frequency of mobile activity for each mobile id.   
                        Number of times an activity occurred in the input file.          
         public void createTable1() {
                        Enumeration e = Activity.keys();
                        int sum;
              while(e.hasMoreElements()) {
                        Vector table1_row = null;
                        String s = (String) e.nextElement();
                        Integer num = (Integer) Activity.get(s);
                        StringTokenizer st1 = new StringTokenizer(s, "|");
                        String mobile_id = (String) st1.nextToken();
                        String mobile_act = (String) st1.nextToken();
                        int row_index = getIndexFromTable1(mobile_id);
                   if(row_index > 0) {
                                  table1_row = (Vector) table1.elementAt(row_index);
                                  sum = ((Integer) table1_row.lastElement()).intValue();
                   else {
                                       table1_row = new Vector();
                                       sum = 0;                    
                   if(table1_row.contains(mobile_id)) {
                        if(mobile_act.equalsIgnoreCase(A1)) {                              //                IMSI attach activity
                                  table1_row.setElementAt(num, 1);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A2)) {                    //                IMSI detach activity
                                  table1_row.setElementAt(num, 2);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A3)) {                    //                Periodic location update activity
                                  table1_row.setElementAt(num, 3);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A4)) {                    //            Normal location update+authentication activity
                                  table1_row.setElementAt(num, 4);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A5)) {                    //            Service request mobile call activity
                                  table1_row.setElementAt(num, 5);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A6)) {                    //                Service request SMS activity
                                  table1_row.setElementAt(num, 6);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A7)) {                    //                Service request supplementary service activation activity
                                  table1_row.setElementAt(num, 7);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A8)) {               //                     Paging response activity                         
                                  table1_row.setElementAt(num, 8);
                                  sum += num.intValue();
                        else if(mobile_act.equalsIgnoreCase(A9)) {               //                    Service request energy activity          
                                  table1_row.setElementAt(num, 9);
                                  sum += num.intValue();
                                  int lastIndex = table1_row.lastIndexOf(table1_row.lastElement());               //       This is the last index which this table
                                  table1_row.setElementAt(new Integer(sum), lastIndex);
                   else {
                        table1_row.addElement(mobile_id);
                        if(mobile_act.equalsIgnoreCase(A1)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A2)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A3)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A4)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A5)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A6)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A7)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                                  table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A8)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                             table1_row.addElement(new Integer("0"));
                        if(mobile_act.equalsIgnoreCase(A9)) {
                             table1_row.addElement(num);
                             sum += num.intValue();
                        else {
                                       table1_row.addElement(new Integer("0"));
                                       table1_row.addElement(new Integer(sum));
                   if(row_index > 0){
                        //          Replace the vector in table1 with updated vector
                                            table1.remove(row_index);
                                            table1.insertElementAt(table1_row, row_index);
                   else {
                                       //                 Add the row vector to the table vector as a row.
                                                           table1.addElement(table1_row);
                   tableToString(table1, "--------------------------Table 1: Number of times activity occurred in input txt file -------------------------- " );
                        Create table 2 by normalising the data values from table 1 
         public void createTable2() {
              for(int ni = 0;ni<table1.size();ni++) {
                        int sum;
                        String name = "";
                                            Vector table2_row = new Vector();
                                            Vector table1_row = (Vector) table1.elementAt(ni);
                   //            For each record of table 1
                   for(int nj = 0;nj<table1_row.size();nj++) {
                        sum = ((Integer) table1_row.lastElement()).intValue();
                        //               Name of the activity
                        if(nj == 0) {
                                       name = (String) table1_row.elementAt(nj);
                                       table2_row.addElement(table1_row.elementAt(nj));
                        else if (nj == (table1_row.size() - 1)) {
                                  //                Don't do any thing, we dont want the sum of activities in table 2 !
                        else {
                             Integer num = (Integer) table1_row.elementAt(nj);
                             int num_val = num.intValue();
                             if(num_val == 0) {
                                            table2_row.addElement(new Float("0.0"));
                             else {
                                  if(sum > 0.0) {
                                            table2_row.addElement(new Float((float)num_val/sum));
                                  else {
                                            table2_row.addElement(new Float("0.0"));
                        table2.addElement(table2_row);
                                            tableToString(table2, "--------------------------Table 2: Table 1's Normalised Values --------------------------");
              Create table 3 by comparing the relationship between vectors of table 2 using
              the Manhattan City Block distance.
         public void createTable3() {
                   Vector reference_vec = null;
              for(int ni = 0;ni<table2.size();ni++) {
                                  reference_vec = (Vector)table2.elementAt(ni);
                                  createTable3Record(reference_vec);
    /*       public void createTable3Record(Vector reference_vec) {
              //       Vector table3_record = new Vector();
              Table3Record table3_record = new Table3Record();
              for(int ni = 0;ni<table2.size();ni++) {
                   float sum = 0;
                   //           String name = "";
                   Vector v = (Vector) table2.elementAt(ni);        //           each record of table2
                   for(int nj = 0;nj<v.size();nj++) {                    //           for each element of a record of table 2. Iterate through table 2.
                        if (nj == 0) {
                             //           name = ((String) v.elementAt(nj))+"\t"+((String) reference_vec.elementAt(nj));
                                            table3_record.name_prefix = (String) v.elementAt(nj);
                                            table3_record.name_suffix = (String) reference_vec.elementAt(nj);
                                                 //       table3_record.value = sum;                         
                        else {
                                                 float f1 = ((Float) v.elementAt(nj)).floatValue();
                                                 float f2 = ((Float) reference_vec.elementAt(nj)).floatValue();
                                  sum += Math.abs(f1-f2);
                                  table3_record.value = sum;
                                       //               table3_record.addElement(new Float(table3_record.value));                    //                Value
                                       //             table3_record.addElement(table3_record.name);                                             //                Vector Names for that value
                                                      table3.addElement(table3_record);
                                       //                table3_record = null;                         
                   OLD CODE BUT AT LEAST IT WORKS !!  //    Creates a record for the third table            //  OLD CODE BUT IT WORKS
         public void createTable3Record(Vector reference_vec) {
                        Vector table3_record = new Vector();
              for(int ni = 0;ni<table2.size();ni++) {
                        float sum = 0;
                        String name = "";
                        Vector v = (Vector) table2.elementAt(ni);             //           each record of table2
                   for(int nj = 0;nj<v.size();nj++) {                    //           for each element of a record of table 2. Iterate through table 2.
                             if (nj == 0) {
                              name = ((String) v.elementAt(nj))+"\t"+((String) reference_vec.elementAt(nj));               /**  MEMORY BUG  ?   */
                                  //name = new StringBuffer().append((String) v.elementAt(nj)).append("\t").append((String) reference_vec.elementAt(nj)).toString();               
                        else {
                                            float f1 = ((Float) v.elementAt(nj)).floatValue();
                                            float f2 = ((Float) reference_vec.elementAt(nj)).floatValue();
                                            sum += Math.abs(f1-f2);                              //            Calculate the sum
                                            table3_record.addElement(new Float(sum));                    //           Value
                                            table3_record.addElement(name);                                             //           Vector Names for that value
                                            table3.addElement(table3_record);
                                            table3_record = null;
                   Method which breaks the contents of the file which is read into memory for processing 
         public void tokenize(String s) {
                                  st = new StringTokenizer(s, "\t");
                                  String id = "";
                                  //       String time = "";
                                  String activity = "";
              if(st.hasMoreTokens()) {
                                            st.nextToken();                                                            //                      Date e.g. 13052003
                                            //           time = st.nextToken();                                                            //            Time          e.g. 11:30:18
                                            st.nextToken();
                                            st.nextToken();                                                            //                      Frame Number e.g. 166827                              
                                            id = st.nextToken().trim();                                   //                          ID e.g. f47c12cffb or 2943012109009630
                                            st.nextToken();                                                            //                          Classmark  e.g 33
                                            st.nextToken();                                                            //                          Float e.g. 2.2  (the distance from base station)
                                            activity = st.nextToken().trim();                    //                      Activity e.g IMSI attach
                   String key = id+"|"+activity;
                                            key = key.intern();               
                   if (Activity.containsKey(key)) {
                                       Integer num = (Integer) Activity.get(key);
                                       int num_val = num.intValue();
                                       num_val += 1;
                                       num = new Integer(num_val);
                                       Activity.put(key, num);
                   else {
                             Activity.put(key, new Integer(1));               //  Insert key into our Hashtable
                   Frees the memory used by a table 
         public void freeTable(Vector table) {
                        for (int ni = 0;ni<table.size();ni++) {
                                            Vector inner = (Vector) table.elementAt(ni);
                                            inner = null;
                                            table = null;
                   Convert a vector to a string suitable for displaying on console output               
         public void tableToString(Vector table, String table_name){
                   System.out.println(table_name + "\n");
                                  for (Iterator it = table.iterator(); it.hasNext();) {                                                              
                                                 System.out.println(it.next());
                   Function which sepearates mobile id usage beween day/night usage.     
         public void calculateTimeInterval(String t1, String t2){
                             //           t' = t1 - t2          
                             //           Look at all the ids
              Date d1,d2;
                             d1 = new Date(t1);
                             d2 = new Date(t2);
                             // TBD
    }

  • How can I optimize the program's performance?

    Editing is going very slow. Audio runs normal but commands and video are delayed. Please let me know how I can make the program perform faster to avoid long edit sessions for simple tasks. My project is saved on a separate internal drive which has 3Tb of storage 99% free. I am running on the following computer (brand new):
    Windows 8
    ASUS Desktop PC M11BB Series
    Processor AMD A10-6700 APU with Radeon HD graphics 3.70 GHz
    Memory RAM 8.8 Gb (7.2 GB usable)
    System: 64-bit
    Please help me speed up the performance of Premiere Pro CC.
    Thanks,
    Jack

    A few things ...
    First, the video card ... while the ATI based cards can have awesome stats for general video playback in other programs or gaming purposes ... they're not the ones that Adobe utilizes the best in the three main video apps: PrPro, Speedgrade, & Ae/Fx. I'm also on a machine originally built for still-image processing utilizing AMD chipset & ATI/Radeon vid card. Was really wondrous for that ... but ssssslllllllllloooooooooooowwwwwww for video. I've a new machine 'designed" but not yet ordered/built (hope to get that done this next week) and the last discussion is that vid card ... my young tech-savvy friend/partner has designed what for the bucks should be an awesome machine ... but wants to put in an ATI card that has 4 gigs vRAM & good flow-through design. For total power within the design of his 'build" for my machine. I'm requesting an nVidia card that's only $40 more, has only 2GB vRAM ... but more memory 'cores' and about a 20% higher memory speed plus of course, being a CUDA card to make best use of the "Mercury Playback Engine" or MPE that Adobe uses to apply many of the effects to the footage as it plays on the program monitor during editing/grading/fx.
    I think your card might not be as optimal for Adobe vid programs as you would prefer.
    Next ... drives. HIGHLY recommended for Adobe vid-processing is a five-drive setup, all functioning at the speed of internal drives: 1) OS/programs; 2) cache; 3) footage; 4) projects; 5) output.
    This avoids read/write bottlenecks. It is also recommended that drives 1 & 2  be SSD's for fast in/outs, and suggested that 3 and 5 might be better on RAID 0 arrays ... again, for faster read/write speeds. The people who've modified their drive situation accordingly typically note a much better general working situation ... but also ...
    RAM ... 16 gigs is pretty minimal for decent operation, 32 better but only if your video card & drives are up to what I've mentioned above. On your machine perhaps the drives would be the first thing to upgrade ...

  • Which is better Function modules or Include programs?

    Hi,
    I am working on an enhancement and it has lot of screens with a tree structure on the left. Now we are planning to have each screen to have its PAI/PBO and the processing logic to be in seperate include programs.
    However in our team we have debate as to go in for include programs or for Function modules. The opinion here is that the program should not take long time to load if its going to be include programs.
    Please suggest what approach is better, is it Function modules or include programs.
    Any other suggestion is also welcome.
    Thank You,
    SAC.

    Thank You all.
    In this enhancement I have about 13 screens and has business logic in each. So if I go with each screens and business logic coding in seperate Function modules than includes under 1 function group is adviceable?
    Using object oriented approach is really the best thing here, but however most of my team members are not welversed in OO concepts. The deadlines are very tight for grooming my team members as well.
    My only concern is that with so much screens and business logic in 1 transaction should not bring down this programs performance when its executed.
    Any other suggestions to keep in mind for this is appreciated.
    Thank You.
    SAC

  • Firefox performed an update (I think to version 18) and after that, it crashes when I try to open it. It crashes when I try to start in safe mode as well.

    I have performed a complete uninstall and reinstall several times. I've checked all the solutions listed in the database and none of them seem to help. I've downloaded the two recommended malware removal programs, performed a complete scan, but they come up with nothing. I've tried to get the details from the error report, but the crasher reporter won't display any. The only thing I get in D:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Crash Reports\ is a file called LastCrash with the number 1357955879 in the file.
    I am running Windows 7, everything has been updated; OS, virus definitions, drivers, etc.

    other users have reported that microsoft safety scanner catches & removes this malware - so try to run a scan with it too: http://www.microsoft.com/security/scanner/default.aspx

  • Performance issue on LIPS table

    Hi Experts,
    I need to know the delivery for particular batches and materials,Hence i am using the below select query in my program
    SELECT vbeln
                 posnr
                 matnr
                 werks
                 lgort
                 charg
                 lfimg
                 meins FROM lips
                INTO TABLE int_lips
    FOR ALL ENTRIES IN int_mchb
                         WHERE vbeln IN s_vbeln
                             AND pstyv IN s_pstyv
                             AND matnr EQ int_mchb-matnr
                             AND werks EQ int_mchb-werks
                            AND lgort EQ int_mchb-lgort
                            AND charg EQ int_mchb-charg.
    My program is fine when delivery is given in the selection screen but it is taking lot of time when no delivery is entered in the selection screen.
    Please guide me how can i increase my program performance. Is there is any need to create the secondary index?
    Thanks in advance.
    Regards,
    Kavya

    Using
    vbeln IN s_vbeln
    slows down your query as the cost of IN operator is high. If it is empty then all records are processed. As this is the left most column in the table so it double slows down as the set of records can't be restrcited to smaller group before next fields are compared.
    The best would be
    select-options s_vbeln ... obligatory.
    "or
    if s_vbeln[] is not initial.
      select ....
    endif.
    Regards
    Marcin

Maybe you are looking for