| Author |
Bulk data through JDBC
|
Garg Amit
Greenhorn
Joined: Jan 13, 2009
Posts: 21
|
|
We have given a file which contains some records (no of records might be in lakhs). Now problem is we have to read the data from this file and then query the database using the data from file. Finally we'd export the data in CSV.
What could be the best way so that we can do this very quick and it should be memory efficient also.
Thanks in advance.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
I've been told before but I forget, what is a lakh?
Usually the best tool for bulk data manipulation is the one supplied with your database, since it will usually allow you to make all sorts of tweeks to aid performance. Which database are you using?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Paul Sturrock wrote:I've been told before but I forget, what is a lakh?
1 lakh = 100,000; 10^5
Lakh
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Garg Amit
Greenhorn
Joined: Jan 13, 2009
Posts: 21
|
|
|
I am using MS SQL server
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
I'd use Transact SQL's bulk insert stuff then. Like I said, it will give you much more control over the loading process than normal SQL. See msdn.
|
 |
 |
|
|
subject: Bulk data through JDBC
|
|
|