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

Comparision between two different approach

Former Member
0 Likes
419

Hi all ,

Please let me know which of the below will be good in terms of performance :

1. SELECT VBELN ERNAM ERDAT VSTEL KUNNR

FROM LIKP

INTO TABLE I_LIKP

WHERE VSTEL IN S_VSTEL

AND LFART IN S_LFART

AND WADAT_IST = 0.

And

2. CONSTANTS: gc_erdat TYPE erdat VALUE IS INITIAL.

SELECT VBELN ERNAM ERDAT VSTEL KUNNR

FROM LIKP

INTO TABLE I_LIKP

WHERE VSTEL IN S_VSTEL

AND erdat GE gc_erda

AND LFART IN S_LFART

AND WADAT_IST = 0.

Also, provide reason for the same.

Thanks in Advance.

VSTEL , ERDAT And LFART are fields in secondary index.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
391

you should not ask such questions, they make no sense,

Write a small report, with


get runtime field start 
 ...
 get runtime field stop.

t = stop - start.

and measure them both, run the SQL Trace.

Result depends to a large extent on the data distribution ... OF YOUR SYSTEM.

Siegfried

2 REPLIES 2
Read only

Former Member
0 Likes
392

you should not ask such questions, they make no sense,

Write a small report, with


get runtime field start 
 ...
 get runtime field stop.

t = stop - start.

and measure them both, run the SQL Trace.

Result depends to a large extent on the data distribution ... OF YOUR SYSTEM.

Siegfried

Read only

Former Member
0 Likes
391

Hi:

SELECT VBELN ERNAM ERDAT VSTEL KUNNR

FROM LIKP

INTO TABLE I_LIKP

WHERE VSTEL IN S_VSTEL

AND erdat GE gc_erda

AND LFART IN S_LFART

AND WADAT_IST = 0.

Is the best, since we should avoid hard cording and more filteration as much as possible

Regards

Shashi