Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

performance tuning

Former Member
0 Kudos

how can we check the performance of our report?

how to improve the performance of our program?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

By using ST05 run the report and get where exactly , it would have taken more time(dump out) , If suppose you cant define primary key in select query, define it .

Otherwise go for creating INDEXES for respective database table.

Thanks,

Krishna Rao

Reward if helpful

5 REPLIES 5

Former Member
0 Kudos

Hi,

By using ST05 run the report and get where exactly , it would have taken more time(dump out) , If suppose you cant define primary key in select query, define it .

Otherwise go for creating INDEXES for respective database table.

Thanks,

Krishna Rao

Reward if helpful

former_member194613
Active Contributor
0 Kudos

There is nothing which can tell you whether your report performs good or bad. Because no program can know what the report is supposed to do.

You can check the runtime, ABAP part und DB part with the SE30, see

/people/siegfried.boes/blog/2007/11/13/the-abap-runtime-trace-se30--quick-and-easy

Maybe you know that it should be faster. Anyway check the hitlist, and the coding of the TOP 10 in net times sorted descending. Try to make them fatser.

If there are DB selects in the TOP 10, then use the SQL trace

see SQL trace:

/people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy

There is something similar to the hit list, that is the view the SQL statements are aggreagted.

Here several checks, such as minimal time per record, bufferung and identical selects tell you whether it could be done better.

NEVER trace your first execution, also run report once or twice and the do the trace. Even better trace several times, check total times of all traces separately, check whether there is not much variation and analyse the fastest trace in detail.

Siegfried

Former Member
0 Kudos

hi

For performance tuning create indexes on standard table, use ST05,Create view,don't use select *,don't use corresponding fields,

use All Enteries.

With Regards

Vipul

former_member194613
Active Contributor
0 Kudos

For performance tuning

> create indexes on standard table,

no

> use ST05,

YES

> Create view,

yes, but join is the same

> don't use select *,

no

> don't use corresponding fields,

no

> use All Enteries

no

Former Member
0 Kudos

Hi tanuj,

this might help

ABAP provides few tools to analyse the perfomance of the objects, which was developed by us.

Run time analysis transaction SE30

This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.

SQL Trace transaction ST05

by using this tool we can analyse the perfomance issues related to DATABASE calls.

Perfomance Techniques for improve the perfomance of the object.

1) ABAP/4 programs can take a very long time to execute, and can make other processes have to wait before executing. Here are some tips to speed up your programs and reduce the load your programs put on the system:

2) Use the GET RUN TIME command to help evaluate performance. It's hard to know whether that optimization technique REALLY helps unless you test it out.

3) Using this tool can help you know what is effective, under what kinds of conditions. The GET RUN TIME has problems under multiple CPUs, so you should use it to test small pieces of your program, rather than the whole program.

4) Generally, try to reduce I/O first, then memory, then CPU activity. I/O operations that read/write to hard disk are always the most expensive operations. Memory, if not controlled, may have to be written to swap space on the hard disk, which therefore increases your I/O read/writes to disk. CPU activity can be reduced by careful program design, and by using commands such as SUM (SQL) and COLLECT (ABAP/4).

5) Avoid 'SELECT *', especially in tables that have a lot of fields. Use SELECT A B C INTO instead, so that fields are only read if they are used. This can make a very big difference.

6) Field-groups can be useful for multi-level sorting and displaying. However, they write their data to the system's paging space, rather than to memory (internal tables use memory). For this reason, field-groups are only appropriate for processing large lists (e.g. over 50,000 records). If you have large lists, you should work with the systems administrator to decide the maximum amount of RAM your program should use, and from that, calculate how much space your lists will use. Then you can decide whether to write the data to memory or swap space.

Use as many table keys as possible in the WHERE part of your select statements.

7)Whenever possible, design the program to access a relatively constant number of records (for instance, if you only access the transactions for one month, then there probably will be a reasonable range, like 1200-1800, for the number of transactions inputted within that month). Then use a SELECT A B C INTO TABLE ITAB statement.

😎 Get a good idea of how many records you will be accessing. Log into your productive system, and use SE80 -> Dictionary Objects (press Edit), enter the table name you want to see, and press Display. Go To Utilities -> Table Contents to query the table contents and see the number of records. This is extremely useful in optimizing a program's memory allocation.

9) Try to make the user interface such that the program gradually unfolds more information to the user, rather than giving a huge list of information all at once to the user.

10) Declare your internal tables using OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to be accessing. If the number of records exceeds NUM_RECS, the data will be kept in swap space (not memory).

11) Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of the records into the itab in one operation, rather than repeated operations that result from a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB is declared with OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to access.

12) If the number of records you are reading is constantly growing, you may be able to break it into chunks of relatively constant size. For instance, if you have to read all records from 1991 to present, you can break it into quarters, and read all records one quarter at a time. This will reduce I/O operations. Test extensively with GET RUN TIME when using this method.

13) Know how to use the 'collect' command. It can be very efficient.

14) Use the SELECT SINGLE command whenever possible.

15) Many tables contain totals fields (such as monthly expense totals). Use these avoid wasting resources by calculating a total that has already been calculated and stored.

Some tips:

1) Use joins where possible as redundant data is not fetched.

2) Use select single where ever possible.

3) Calling methods of a global class is faster than calling function modules.

4) Use constants instead of literals

5) Use WHILE instead of a DO-EXIT-ENDDO.

6) Unnecessary MOVEs should be avoided by using the explicit work area operations

see the follwing links for a brief insifght into performance tuning,

http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp

1. Debuggerhttp://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

2. Run Time Analyser

http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm

3. SQL trace

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm

4. CATT - Computer Aided Testing Too

http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm

5. Test Workbench

http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm

6. Coverage Analyser

http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm

7. Runtime Monitor

http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm

8. Memory Inspector

http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm

9. ECATT - Extended Computer Aided testing tool.

http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm

Performance tuning for Data Selection Statement

http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm

Reward of it helps