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

code optimization Array Insert vs insert from ITAB

Former Member
0 Likes
513

Hi,

I have a general question.

I am doing insert using

Insert into <table> from <Internal-Table>

where <Internal-Table> contains more than hundred record.

Also just for your information. I am doing insertion just one by one. I am doing batch input which means that Internal Table already contains 100 record. I know if I do insert one by one..it will be costly I/O operation. That is the reason, I made sure that my Internal Table contains all the record before I do insert.

My question is, whether my insert statment is optimal way to do insert?

I read somewhere that Array Insert is better.

Could you explain why so.

2 REPLIES 2
Read only

Former Member
0 Likes
444

I think you'll find that an array insert means inserting from an internal table, so you're OK as is.

Rob

Read only

rajasekhar_matukumalli3
Active Participant
0 Likes
444

Hi,

If you are insering into a database table, I suggest you to use MODIFY command rather than INSERT to avoid any kind of dumps due to duplicates.

Thanks

Raj