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

Similar Messages

  • How to improve the performance of the abap program

    hi all,
    I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
    Using se30 and st05 transaction.
    can anyone help me out step by step
    regds
    haritha

    Hi Haritha,
    ->Run Any program using SE30 (performance analysis)
    Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
    Using this you can improve the performance by analyzing your code part by part.
    ->To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    ->To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    ->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    ->Avoid for all entries in JOINS
    ->Try to avoid joins and use FOR ALL ENTRIES.
    ->Try to restrict the joins to 1 level only ie only for tables
    ->Avoid using Select *.
    ->Avoid having multiple Selects from the same table in the same object.
    ->Try to minimize the number of variables to save memory.
    ->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    ->Avoid creation of index as far as possible
    ->Avoid operators like <>, > , < & like % in where clause conditions
    ->Avoid select/select single statements in loops.
    ->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
    ->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    ->Avoid using ORDER BY in selects
    ->Avoid Nested Selects
    ->Avoid Nested Loops of Internal Tables
    ->Try to use FIELD SYMBOLS.
    ->Try to avoid into Corresponding Fields of
    ->Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    edited by,
    Naveenan

  • How to improve the performance of one program in one select query

    Hi,
    I am facing performance issue in one program. I have given some part of the code of the program.
    it is taking much time below select query. How to improve the performance.
    Quick response is highly appreciated.
    Program code
    DATA: BEGIN OF t_dels_tvpod OCCURS 100,
    vbeln LIKE tvpod-vbeln,
    posnr LIKE tvpod-posnr,
    lfimg_diff LIKE tvpod-lfimg_diff,
    calcu LIKE tvpod-calcu,
    podmg LIKE tvpod-podmg,
    uecha LIKE lips-uecha,
    pstyv LIKE lips-pstyv,
    xchar LIKE lips-xchar,
    grund LIKE tvpod-grund,
    END OF t_dels_tvpod,
    DATA: l_tabix LIKE sy-tabix,
    lt_dels_tvpod LIKE t_dels_tvpod OCCURS 10 WITH HEADER LINE,
    ls_dels_tvpod LIKE t_dels_tvpod.
    SELECT vbeln INTO TABLE lt_dels_tvpod FROM likp
    FOR ALL ENTRIES IN t_dels_tvpod
    WHERE vbeln = t_dels_tvpod-vbeln
    AND erdat IN s_erdat
    AND bldat IN s_bldat
    AND podat IN s_podat
    AND ernam IN s_ernam
    AND kunnr IN s_kunnr
    AND vkorg IN s_vkorg
    AND vstel IN s_vstel
    AND lfart NOT IN r_del_types_exclude.
    Waiting for quick response.
    Best regards,
    BDP

    Bansidhar,
    1) You need to add a check to make sure that internal table t_dels_tvpod (used in the FOR ALL ENTRIES clause) is not blank. If it is blank skip the SELECt statement.
    2)  Check the performance with and without clause 'AND lfart NOT IN r_del_types_exclude'. Sometimes NOT causes the select statement to not use the index. Instead of 'lfart NOT IN r_del_types_exclude' use 'lfart IN r_del_types_exclude' and build r_del_types_exclude by using r_del_types_exclude-sign = 'E' instead of 'I'.
    3) Make sure that the table used in the FOR ALL ENTRIES clause has unique delivery numbers.
    Try doing something like this.
    TYPES: BEGIN OF ty_del_types_exclude,
             sign(1)   TYPE c,
             option(2) TYPE c,
             low       TYPE likp-lfart,
             high      TYPE likp-lfart,
           END OF ty_del_types_exclude.
    DATA: w_del_types_exclude TYPE          ty_del_types_exclude,
          t_del_types_exclude TYPE TABLE OF ty_del_types_exclude,
          t_dels_tvpod_tmp    LIKE TABLE OF t_dels_tvpod        .
    IF NOT t_dels_tvpod[] IS INITIAL.
    * Assuming that I would like to exclude delivery types 'LP' and 'LPP'
      CLEAR w_del_types_exclude.
      REFRESH t_del_types_exclude.
      w_del_types_exclude-sign = 'E'.
      w_del_types_exclude-option = 'EQ'.
      w_del_types_exclude-low = 'LP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      w_del_types_exclude-low = 'LPP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      t_dels_tvpod_tmp[] = t_dels_tvpod[].
      SORT t_dels_tvpod_tmp BY vbeln.
      DELETE ADJACENT DUPLICATES FROM t_dels_tvpod_tmp
        COMPARING
          vbeln.
      SELECT vbeln
        FROM likp
        INTO TABLE lt_dels_tvpod
        FOR ALL ENTRIES IN t_dels_tvpod_tmp
        WHERE vbeln EQ t_dels_tvpod_tmp-vbeln
        AND erdat IN s_erdat
        AND bldat IN s_bldat
        AND podat IN s_podat
        AND ernam IN s_ernam
        AND kunnr IN s_kunnr
        AND vkorg IN s_vkorg
        AND vstel IN s_vstel
        AND lfart IN t_del_types_exclude.
    ENDIF.

  • How to increase the performance of a program

    How to increase the performance of a program.
    Regards
    Lisa
    Message was edited by: Lisa Roy

    Here are some links that may help.
    http://www.sapinsideronline.com/searchspi/search.htm?page=article&key=20297&query_text=performance%7Ctuning
    http://www.sapinsideronline.com/searchspi/search.htm?page=article&key=44221&query_text=performance%7Ctuning

  • 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
    }

  • Inner Join. How to improve the performance of inner join query

    Inner Join. How to improve the performance of inner join query.
    Query is :
    select f1~ablbelnr
             f1~gernr
             f1~equnr
             f1~zwnummer
             f1~adat
             f1~atim
             f1~v_zwstand
             f1~n_zwstand
             f1~aktiv
             f1~adatsoll
             f1~pruefzahl
             f1~ablstat
             f1~pruefpkt
             f1~popcode
             f1~erdat
             f1~istablart
             f2~anlage
             f2~ablesgr
             f2~abrdats
             f2~ableinh
                from eabl as f1
                inner join eablg as f2
                on f1ablbelnr = f2ablbelnr
                into corresponding fields of table it_list
                where f1~ablstat in s_mrstat
                %_HINTS ORACLE 'USE_NL (T_00 T_01) index(T_01 "EABLG~0")'.
    I wanted to modify the query, since its taking lot of time to load the data.
    Please suggest : -
    Treat this is very urgent.

    Hi Shyamal,
    In your program , you are using "into corresponding fields of ".
    Try not to use this addition in your select query.
    Instead, just use "into table it_list".
    As an example,
    Just give a normal query using "into corresponding fields of" in a program. Now go to se30 ( Runtime analysis), and give the program name and execute it .
    Now if you click on Analyze button , you can see, the analysis given for the query.The one given in "Red" line informs you that you need to find for alternate methods.
    On the other hand, if you are using "into table itab", it will give you an entirely different analysis.
    So try not to give "into corresponding fields" in your query.
    Regards,
    SP.

  • How to write a perform in Sap Script

    Hi Guys,
    Can anyone let me know how to write a perform statement in Sap Script.
    Thanks,
    Ramesh

    I just took this example from SAP Help
    =======================================
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.

  • How to analyze statspack report

    Is there any book I can read to understand how to deal with the sp report ?
    I know how to read part of it ,
    what I need is something that guide what I can do when I see that wait event X is too high.
    for exmaple , if dc_constraints is too high , what do I have to change ?
    not only that , I have to analyze the rest of the report , I see how can we improve performance .
    Thanks .

    Hi,
    how to analyze the reportWell, I have my notes here:
    http://www.dba-oracle.com/t_reading_statspack_report.htm
    Also, you can paste-in a STATSPACK report into http://www.statspackanalyzer.com and learn how to analyse a STATSPACK report.
    There are several Oracle Press books on STATSPACK, you may find useful:
    http://www.amazon.com/Oracle9i-High-Performance-Tuning-STATSPACK-Burleson/dp/007222360X
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

  • How to solve thsi perform/form error occured in epc check

    Call to a program containing a syntax error (CALL/PERFORM/SUBMIT)
    Error in program /SAPAPO/SAPLATPQ_TIMESERIES - include /EPCOS/SD_CRSD0035_04 -
    line 76
    Syntax check error message:
    A target area must be declared either explicitly with an INTO clause or implicitl
    with a TABLES statement.
    Internal Message Code: MESSAGE GYN
    after clicking on error iam getting this statement how to solve this
    PERFORM localise_reqtms(/sapapo/saplatpq_timeseries)
                    USING space
                    CHANGING l_ts_endhor.

    Hi,
      This may be beacuse of the Internal Table you are passing to the Subroutine.
    So, In the Subroutine definition, we need to change the interface definition.
    FORM localise_reqtms(/sapapo/saplatpq_timeseries)
               USING SPACE as type C
               CHANGING L_TS_ENDHOR LIKE <Internal Table Type which you are using>  
    Thanks & Regards,
    Vamsi.

  • How to improve the performance of Standard Extractors

    Hi All,
    Can you please let me know how to monitor the performance of Standard Extractors. For one of the extractor which have 350K records in source, it is taking 4hrs to load to BI.
    I want to know which part of the program is taking more time.
    Thanks in Advance
    RK

    No, that exception is thrown when the underlying
    socket (tcp/ip) implementation cannot reserve buffer
    space for new sockets afaik. I get it on windows
    machines when the concurrent connection load reaches
    17-18k connections. I do believe it's configurable
    though.And what happens if your max server load is 7-8 connections an hour and you never close the connections?

  • How to improve the performance of the query

    Hi,
    Help me by giving tips how to improve the performance of the query. Can I post the query?
    Suresh

    Below is the formatted query and no wonder it is taking lot of time. Will give you a list of issues soon after analyzing more. Till then understand the pitfalls yourself from this formatted query.
    SELECT rt.awb_number,
           ar.activity_id as task_id,
           t.assignee_org_unit_id,
           t.task_type_code,
           ar.request_id
    FROM activity_task ar,
         request_task rt,
         task t
    WHERE ar.activity_id =t.task_id
    AND ar.request_id = rt.request_id
    AND ar.complete_status != 'act.stat.closed'
    AND t.assignee_org_unit_id in (SELECT org_unit_id
                                   FROM org_unit
                                   WHERE org_unit_id in (SELECT oo.org_unit_id
                                                         FROM org_unit oo
                                                         WHERE oo.org_unit_id='3'
                                                         OR oo.parent_id ='3'
                                   OR parent_id in (SELECT oo.org_unit_id
                                                    FROM org_unit oo
                                                    WHERE oo.org_unit_id='3'
                                                    OR oo.parent_id ='3'
                                   AND has_queue=1
    AND ar.parent_task_id not in (SELECT tt.task_id
                                  FROM task tt
                                  WHERE tt.assignee_org_unit_id in (SELECT org_unit_id
                                                                    FROM org_unit
                                                                    WHERE org_unit_id in (SELECT oo.org_unit_id
                                                                                          FROM org_unit oo
                                                                                          WHERE oo.org_unit_id='3'
                                                                                          OR oo.parent_id ='3'
                                                                     OR parent_id in (SELECT oo.org_unit_id
                                                                                      FROM org_unit oo     
                                                                                      WHERE oo.org_unit_id='3'
                                                                                      OR oo.parent_id ='3'
                                                                     AND has_queue=1
    AND rt.awb_number is not null
    ORDER BY rt.awb_numberCheers
    Sarma.

  • Is the 3.06 GHz iMac good enough for gaming? How good is the performance?

    The primary difference between the two cheapest iMacs is the graphics card and the 500 GB hard drive increase. The hard drive upgrade can be ignored for a moment, since the worst case scenario is I buy an external 500 GB hard drive for $50. For the graphics card, though, how big of a performance boost would I get from upgrading to the next graphics card, which would be going from the ATI Radeon HD 4670 with 256MB to the ATI Radeon HD 5670 with 512MB? Is the 256MB probably going to be sufficient to last at least four years, or should I just pay the extra $300 or so to upgrade to the 512 MB? The market price difference between the two models is about $50 at the moment.
    I have a MBP right now as you can see in my signature; as it's four years old already, gaming-wise, it can't really play the latest games anymore. It's capable of playing Call of Duty 4: Modern Warfare (not the sequel) at the lowest graphics settings and only getting 30 FPS or so when there's little action, but that can easily drop to 15 FPS or less when there's stuff happening on the screen.
    I don't play video games all that much (let's say five hours a week), but I'd at least like a computer that doesn't need to be replaced too soon, either, so I'm currently on the fence between these two models. I definitely don't want to go the next step and get a 27" iMac, though, since I already have a 21" monitor and so getting an extra 21" iMac would fit best with it, and I'm happy with the size as it is as I usually use my computer for programming and such.

    Not even the top end card included in the 27" models is going to last 4 years, so you may as well rule out the iMac right now. You're going to want something a bit more user-friendly on the upgrade front. So, that limits you to the Mac Pro if you want to stay with Apple products. Otherwise, you're going to want to build your own PC so you can build in some modularity.

  • Need help in analyzing the performance aspects of compounding

    Hi all,
    i am analyzing the performance aspects of compounding.
    can anyone guide me about how do i go about?

    when i displayed this table, it is showing some timestamps and validity period for the queries.  i am having some difficulty in understanding this table details.
    can u please guide me regarding this ?
    also can anyone please help me on how do i analyze the OLAP processor performance for the  queries that use compounding?

  • 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

  • How to analyze full database

    Hi all,
    Can we analyze full database, if yes How to analyze full database and what is the command for that
    Thanks & Regards
    Venu

    Venu,
    My recommendation to you is that collect statistics for the schemas which are required. Using dbms_stats.gather_schema_stats. Also, collect system statistics to boos cbo to get produce more optimized execution plans.
    Leave apart sys (dictionary table) statistics.
    Read oracle performance tuning guide for more on how to collect system stastitics and pros and cons of it, try to do it on test or uat env. first, before going on production.
    jaffar

Maybe you are looking for

  • On Demand sub report not printing in IE and Other Browsers

    Hi All, We have developed Crystal report for our web application with version 13.0 and Visual Studio 2010. When we run our web app in IIS report display fine in All web browser and when we print report in ActiveX mode in IE 9+ for main report it prin

  • HELP PLEASE cannot install Mac Osx

    hey I really need help please! I tried to modified my dock using my resources folder in the dock components but I surely did something wrong cause when I tried to click on time machine, it said that I need the right osx version. So I restarted my com

  • MacBook vs. MacBook with retina

    I can't decide between The MacBook Pro or The MacBook Pro with retina display. I love the retina but I really would live to be able to use CDs on it. Is there anyway to get a CD user thing on The MacBook with retina?

  • Increment date parameters on each run

    Hi, while scheduling concurren requests. we have option like "increment date parameters on each run" what exactly the meaning of the above

  • How can i catch the gotfocus and lostfocus events

    Hi Dear; i tried to catch the gotfocus and lostfocus events, but i can't. in the same code i can catch the onclick events. is there any special code for the gotfocus and lostfocus events? regards;