Application Development and Automation 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: 
Read only

Performance issue

Former Member
0 Likes
758

Hi experts,

I have the following query.

SELECT LIKPVBELN LIPSPOSNR LIKPERDAT LIKPINCO1 LIKP~INCO2

LIKPBOLNR LIKPWADAT_IST LIKP~LIFEX

LIPSLFIMG LIPSBWART LIPSPSTYV LIKPVBTYP VBPA~LIFNR

INTO TABLE I_LIKP FROM LIKP

INNER JOIN LIPS

ON LIPSVBELN = LIKPVBELN

INNER JOIN VBPA

ON VBPAVBELN = LIKPVBELN AND

VBPA~POSNR = 0

FOR ALL ENTRIES IN I_VBFA

WHERE LIPS~VBELN = I_VBFA-VBELN

AND LIPS~POSNR = I_VBFA-POSNN AND

VBPA~PARVW = 'SP'. " SP denoted Carrier Type Partner

can anybody tell me whether this query is good performance wise? if not how can we modify this statement?

Thanks & Regards,

Sudheer

Edited by: sudheer kumar on Jan 29, 2009 7:02 AM

use meaningful subject

Edited by: Vijay Babu Dudla on Jan 29, 2009 5:29 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
719

Hi,

i suggest you to write ONLY this query in the program and then execute...

SE30 and ST05.

Based on the outcome, if the database time/performance is more, you need to modify the query...

SE30: Run time analysis: ABAP part should be more than the database part..

ST05: Database trace..You can check the time in seconds to fetch the data..from the table...(it should be ideally less--Only in Yellow color..Red color indicates bad performance)

Regards

Shiva

5 REPLIES 5
Read only

Former Member
0 Likes
720

Hi,

i suggest you to write ONLY this query in the program and then execute...

SE30 and ST05.

Based on the outcome, if the database time/performance is more, you need to modify the query...

SE30: Run time analysis: ABAP part should be more than the database part..

ST05: Database trace..You can check the time in seconds to fetch the data..from the table...(it should be ideally less--Only in Yellow color..Red color indicates bad performance)

Regards

Shiva

Read only

Former Member
0 Likes
719

You can do the following changes:

1. Change LIPSVBELN = I_VBFA-VBELN to LIKPVBELN = I_VBFA-VBELN

2. Since you are supplying only partner functin PARNR as input to the query, and are only interested in partners attached to delivery header (as you say VBPA~POSNR = 0), I would advice you to decouple VBPA from the join, as the query is occurring at item level. .

Read only

0 Likes
719

I will suggest you to use the view WB2_V_LIKP_LIPS2. And inner joins will not affect performance when compared to use of loops if you run two separate queries.

Read only

Former Member
0 Likes
719

check in se30 and st05 .there you can check your performance.

Read only

Former Member
0 Likes
719

> ST05: Database trace..You can check the time in seconds to fetch the data..from the table...

> (it should be ideally less--Only in Yellow color..Red color indicates bad performance)

recommendation is good

interpretation is wrong, red color means only that it need more than 100ms

This can be o.k., if 10.000 records are read!

Go to Table -> Summarize by SQL statements!

Statement should appear in first row, if it is the most expensive select statement.

Reason for large duration is:

+ many records are read => Really necessary?

+ or each record needs a long time, check MinTime/R or AvgTime/R, usually if they are larger

than 10.000 microseconds, then performance of the statement is bad!

For a good statement these entries go down to 200 or even 100 microseconds.

Siegfried