cancel
Showing results for 
Search instead for 
Did you mean: 

Performance tuning of program

Former Member
0 Kudos
636

Hi,

I have a program which going to short-dump (TIME_OUT error) as the max. time allocated by system has been exceeded. Now, I want to make some modification to the program to increase its performance. The progarm has a large no. of inner joins. All primary keys have been used. Still, the short dump occurs when the program is run. Can somebody give some tips/tricks to increase performance without much change in the code.

Thanks in advance.

Regards,

Arun Mohan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun

Run the SQL trace (ST05) and find out the expensive select statements. Create indices covering the fields in where clause of the select statement. And use Database hints to point to your index(optionally)

And keep these points in mind:

1. Avoid select-endselects, and for that matter all the unnecessary loops.

2. Use 'For all entries in' in case of nested selects. (pl check if the database is oracle)

3. in case u have any select inside the loop, do a generic select into some itab outside the loop and replace the original select by read statement from the internal table.

4. In case u do not have all the primary keys do not go for select single (do a select upto one rows)

5. In case of select statements pl verify all the fields are in the same order as they appear in the database table.

6. Always advisable to get your data into an internal table at once , if there are multiple read statments on a particulat table.

7. Avoid repeated selects of same type.

8. Go for buffering of table, in case you have several sql queries on a particular table.

Hope this helps

regards

Alok Pathak

former_member583013
Active Contributor
0 Kudos

You can use Tx. <b>SE30</b> also...Just pass the Tx or the Program name, run it and you're going to see which are the most consuming processes.

Greetings,

Blag.

Answers (4)

Answers (4)

Former Member
0 Kudos

Could you please post the portion of the code that you think is causing the problem?

Rob

vinod_gunaware2
Active Contributor
0 Kudos
vinod_gunaware2
Active Contributor
0 Kudos

Hi

Avoid SELECT...ENDSELECT.

Select statement sequence of input field should be same.

Use join instead of for all entries

Avoid nested loop.

Use join or for all entries instead of nested loop.

Avoid select statement in loop.

Use index in where condition with same sequence(Blank range use if u dont have varible in R_VBELN)

Use read statement and use Binary search.

regards

vinod

Former Member
0 Kudos

Hi Arun,

Use the SQL-trace function to find out if the proper indexes of the tables involved are being used.

Regards,

John.