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

Select afru slow

Former Member
0 Likes
684

Hi,

I'm doing the following SELECT.

SELECT pernr

aufnr

ismne

ismnw

meinh

budat

catsbelnr

isdd

FROM afru

INTO TABLE t_afru

FOR ALL ENTRIES IN t_pa0000

WHERE pernr = t_pa0000-pernr AND

isdd BETWEEN v_ct_date_fr AND v_ct_date_to

AND catsbelnr EQ ''

AND stokz NE 'X'

AND stzhl EQ 0.

This taking too long, how could it improve performance?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
574

Hi,

Thats because you are not using the primary keys RUECK and RMZHL in the where condition of the select which is affecting the performance.

If it is not possible to use the primary keys, then try creating a secondary index on the field pernr and isdd. That will considerably increase the performance.

Also use the condition if not t_pa0000[] is initial before the select query since you are using FOR ALL ENTRIES.

Regards,

Vikranth

Hi,

I'm doing the following SELECT.

SELECT pernr

aufnr

ismne

ismnw

meinh

budat

catsbelnr

isdd

FROM afru

INTO TABLE t_afru

FOR ALL ENTRIES IN t_pa0000

WHERE pernr = t_pa0000-pernr AND

isdd BETWEEN v_ct_date_fr AND v_ct_date_to

AND catsbelnr EQ ''

AND stokz NE 'X'

AND stzhl EQ 0.

This taking too long, how could it improve performance?

2 REPLIES 2
Read only

Former Member
0 Likes
575

Hi,

Thats because you are not using the primary keys RUECK and RMZHL in the where condition of the select which is affecting the performance.

If it is not possible to use the primary keys, then try creating a secondary index on the field pernr and isdd. That will considerably increase the performance.

Also use the condition if not t_pa0000[] is initial before the select query since you are using FOR ALL ENTRIES.

Regards,

Vikranth

Read only

0 Likes
574

Hi,

Do you know any way to get this information and RUECK RMZHL to improve performance?

At the moment I will not be able to insert indec.

Thanks

Rafael Fassoli