Skip to Main Content

Java Database Connectivity (JDBC)

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!

batch insert mysql

843859Jun 5 2008 — edited Nov 20 2014
hi all

actually my code is..am using mysql..

Iterator itr = alist.iterator();

*while(itr.hasNext()){*

Exdo exdo = itr.next();

pstmt.setInt(1,exdo.getNo());
pstmt.setString(2,exdo.getName());

pstmt.executeUpdate();
*}*


this set of code is very slow when the alist size is high.. how do i change it to batch insert..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2008
Added on Jun 5 2008
3 comments
66 views