SELECT statement performance in ABAP compared to SE16N

We have one custom program which has been running fine. Now, we have added following code and program is taking 5-7 minutes compared to 8-10 seconds.

    SELECT ACCVOUCHERNO EWBNUMBER FROM ZDIGI_OOWARD_H
    INTO TABLE gt_zdigi_ooward_h
    FOR ALL ENTRIES IN gt_vbrk
    WHERE ACCVOUCHERNO gt_vbrkvbeln.

Number of records  in gt_vbrk is approx. 2000 (rows and 2 columns) and using gt_vbrk-vbeln values in SE16N is taking max. 15 seconds. Also, ACCVOUCHERNO is key field in custom table along with 4 more primary keys. Custom table ZDIGI_OOWARD_H has approx 1.4 M records.

Looking for help to understand the reason for such delay in select statement.

Scroll to Top