Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Santanu

 
San De
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to insert multiple row into a table by using a stored procedure.I set the input parameter for this SP inside a foor loop and execut this SP. but I think its very costly. because inside a for loop every time i am calling sp.execute. suggest me the most efficient way to insert multiple records inside a table.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand how the subject relates to your post.

The most efficient way to do multiple updates is to use JDBC batch updates. This reduces the number of database roundtrips.

Since this is about JDBC, I'll move it to our JDBC forum for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic