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: 

Comparision between two different approach

Former Member
0 Kudos

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

former_member194613
Active Contributor
0 Kudos

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

former_member194613
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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