Solved

Bulk Insert using Java-SpringFramework-JDBCTemplate

Posted on 2006-06-08
6
4,179 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
map related example 6 55
Way to decrease size of apk file 9 86
check java version using powershell 13 168
Chrome and Firefox Java 5 50
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

809 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