Skip to Content
0
Jun 07, 2022 at 11:45 AM

commit each record in loop v/s bulk commit

67 Views

Hi,

I have query. Which option gives best performance ?

Option 1 :- Committing record in loop per row.

Option2 :- Commit after loop, entire table in one go i.e. bulk commit.

e.g.

option1

LOOP AT it_mis INTO wa_mis.
INSERT z_mis_his FROM wa_mis .
COMMIT WORK.
CLEAR wa_mis.
ENDLOOP.

option 1

LOOP AT it_mis INTO wa_mis.
INSERT z_mis_his FROM wa_mis .
CLEAR wa_mis.
ENDLOOP.

COMMIT WORK.