Solved

Bulk Insert using Java-SpringFramework-JDBCTemplate

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

770 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