Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bulk Insert Performance

jwebMar 16 2012 — edited Mar 19 2012
I have a loop that generates dynamic SQL Insert statements.

execute immediate 'INSERT INTO STD_IMPORTS( FULL_NAME, HOUSE_NUMBER, IMPORT_DATE ) SELECT CUSTOMER_NAME, to_number(ADDRESS_NUMBER), TRUNC(SYSDATE) FROM STAGINGS_1 LOG ERRORS INTO err$_STD_IMPORTS (''INSERT ROW'') REJECT LIMIT 5';

This statement works fine, but in my test run I insert 100,000 recrods, and this took around 12 seconds. Would this be more efficient to put the values into a bulk collection first then insert? I am a bit vague on collections, I tried using a buil collect into a table but then couldn't insert this as I got a 'not enough values' error.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2012
Added on Mar 16 2012
4 comments
1,264 views