05-29-2006 12:15 PM
Hi Folks,
1.how do we start/do the performance tuning?
2.we can adjust/re-built the select statments if they are taking much processing time..but is there any thing else where we can improve the performance other than select satements in the program?
Regards,
Raja.
05-29-2006 12:20 PM
Hi,
Take a look at these blogs
/people/rich.heilman2/blog/2006/03/07/using-field-symbols-in-loop-statements--performance-boost
/people/sergio.ferrari2/blog/2006/01/18/simple-abap-benchmark
/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops
/people/harry.dietz/blog/2005/10/28/performance-improvement-hints-3-internal-table--fill-and-read
/people/harry.dietz/blog/2005/11/03/performance-improvement-hints-4-loop-at-itab-where
/people/harry.dietz/blog/2005/10/11/performance-improvement-hints-date-time-timestamps
Regards
Ravi
Note : Please mark the helpful answers
05-29-2006 12:25 PM
>>1.how do we start/do the performance tuning?
execute se30 and give your program name or transaction code and then execute.when finished you can analyse how much time your program is taking at the application server and database server level.you will get the time in micro seconds.
if you want to know which select query is taking much time then you need to do the sql trace using the transaction st05.
Please go thru the documents in http://help.sap.com
>>.we can adjust/re-built the select statments if they are taking much processing time..but is there any thing else where we can improve the performance other than select satements in the program?
Primarily the performance issue generally come from the program taking much time at the database server level.Remember we can have only one database.
dont use select * instead use select with the respective field addition.don't use select single if you intend to read more than once from the same table.dont use select statement between loop and endloop.avoid joins whenever possible use select for all entries or views instead.
you can also fine tune your program at the application server level.
here are the tips.
use loop at assigning variant if the loop pass is more than 10 this will improve the performance when compared to loop at itab into variant.
dont use nested loops like.
loop at itab1.
loop at itab2.
endloop.
endloop.
instead use
loop at itab1.
read table itab2...
endloop.
Hope this will clarify your basic doubts regarding performacne tuning...
Cheers,
Abdul Hakim
05-29-2006 12:29 PM
HI
GOOD
GO THROUGH THESE LINKS WHICH WILL GIVE YOU THE BRIEF IDEA ABOUT THE PERFORMANCE TUNING.
http://web.mit.edu/sapr3/docs/webdocs/getstarted/gsTABLEVIEW.html
http://sap.niraj.tripod.com/id19.html
http://www.planetsap.com/Userexit_List.htm
http://www.allsaplinks.com/material.html
http://www.sap-img.com/abap-function.htm
SLDB-To find out the logical database details
http://de.geocities.com/rafaelreichle/abapkeywords.html
STMS-Transport Management System
http://www.kabai.com/abaps/q.htm
http://www.skytechnologies.com.au/default_files/job_scheduling.htm
http://www.sapdevelopment.co.uk/fmodules/fmsfield.htm
http://help.sap.com/saphelp_nw04/helpdata/en/59/cd7daa07d711d5b66f006094192fe3/content.htm
http://www.sapfriends.com/sapstuff.html
http://esnips.com/webfolder/59b7ad16-ec4c-4628-9677-0ed83278d97f
http://mitvma.mit.edu/sapweb/detail.html
THANKS
MRUTYUN
05-29-2006 12:46 PM
Hi hakim,
thanks for quick reply...
i know the ptuning at data server level.
i can't understand application server level...cud u plz explain that ..
please mention any other concers at app server level other than the one you mentioned...
Regards,
Raja.
05-29-2006 12:57 PM
hi
your open sql statements will perform operations at the database server level..right..while the other other ABAP statements like LOOP,ENDLOOP etc will perform operation at the applciation server level.so i told that you can avoid nested LOOPs.
Cheers,
Abdul Hakim
05-29-2006 12:52 PM
Hi Raja,
I have a very good PDF on this. Please give me your email id, I will send the same to you.
<b>Also, reward points if it helps in any way.</b>
Regards,
Amit Mishra
05-29-2006 12:58 PM
hi,
check this link:
www.thespot4sap.com/articles/ SAPABAPPerformanceTuning_ABAPSort.asp - 21k -
regards,
keerthi.
05-29-2006 1:11 PM
Hi Amit,
please do send me the PDF , as it wud be most useful for me.
my mail-id is rajagurrala@gmail.com
Regards,
Raja.
05-29-2006 1:18 PM
Hi Raja,
I have sent you the PDF. Please check and confirm.
<b><b>Also, reward points if it helps.</b></b>
Regards,
Amit Mishra
05-29-2006 1:26 PM
Hi,
A task can be completed either by calling a class or a function module. Calling methods of a global class is faster than calling a function module.
Calling local methods is nearly identical to calling global methods in terms of performance.
Fields of type-I should be used for typical integral variables.
If you are dealing with type-I or integral type-P fields, then use numeric literals or named constants with a number type instead of character strings.
It is preferable to use constants instead of literals.
For arithmetic operations, number types should be used instead of the type-N fields. Type-N fields should be used only for pure digit strings that are not intended for calculations e.g. the pin code for a city.
Use WHILE instead of a DO-EXIT-ENDDO construction. WHILE statements are easier to understand and faster in execution.
It is preferable to use CASE statements over IF statements. CASE statements bring clarity to the conditional constructs and are a little faster than IF statements.
For the calling of routines, PERFORM i Of ... statement can be a much faster alternative to using CASE or IF constructs.
If you specify the type for formal parameters in your source code, the ABAP/4 compiler can optimize your code more thoroughly. In addition, the risk of using the wrong sequence of parameters in a PERFORM statement is much less.
If you specify the type of field-symbols and formal parameters in your source code, the ABAP/4 compiler can optimize your code better.
Unnecessary MOVEs should be avoided by using the explicit work area operations.
rgds,
latheesh