[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4293
  • Last Modified:

Bulk Insert using Java-SpringFramework-JDBCTemplate

How can I use Spring Framework's JDBCTemplate to do bulk inserts? I am using Java/J2EE and MySQl server in UNIX. My goal is to make the solution performance effective.
0
dassoug
Asked:
dassoug
  • 2
2 Solutions
 
objectsCommented:
Use the batchUpdate() methods.
0
 
YagantappaCommented:
I would suggest to use command line options for bulk inserts instead of spring JDBCTemplate
0
 
dassougAuthor Commented:
Yagantappa,

Can you elaborate on this command line options and how can I use this from my web based application (the application will be able to upload a csv file to the server, read the file and do a bulk insert into mysql db)?

Thanks
0
 
YagantappaCommented:
1. Load csv file to server. (Use multipart)
2. Thru java invoke "LOAD DATA INFILE ..."

For "LOAD DATA INFILE .." syntax, go to http://dev.mysql.com/doc/refman/5.0/en/load-data.html
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now