Solved

Bulk Insert using Java-SpringFramework-JDBCTemplate

Posted on 2006-06-08
6
4,163 Views
Last Modified: 2009-05-14
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
Comment
Question by:dassoug
  • 2
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 63 total points
ID: 16866486
Use the batchUpdate() methods.
0
 
LVL 4

Expert Comment

by:Yagantappa
ID: 16867955
I would suggest to use command line options for bulk inserts instead of spring JDBCTemplate
0
 

Author Comment

by:dassoug
ID: 16871855
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
 
LVL 4

Assisted Solution

by:Yagantappa
Yagantappa earned 62 total points
ID: 16879641
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now