Results 1 to 7 of 7
- 12-27-2010, 03:53 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
how to improve upload performance?
Hi,
I am new in java upload excel data to db. Currently I had do some performance testing with 10 thousand rows of records in excel to be inserted into db, and it took around 40 second. I am looking forward to reduce the time taken even more. I am very much appreciate for any suggestions or idea from you all.
I am using org.apache.poi to get the data out from excel using jsp, then insert save the data into a table. There is no table join or big linking is used.
Please help me in this knotty problem, thank you.
- 12-27-2010, 05:15 AM #2
If it's 10,000 rows that u said done testing, I would say 40 seconds was fair results. Speed, performance also depends upon what db use. Google and search for db comparison.
-Regards
- 12-27-2010, 09:28 AM #3
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
Thanks for your suggestion Prajin, my db used is SQL server 2008. I think I will look into it even more because my client was expecting something like 20 second, which it sound very ridiculous for me to achieve, lol. I am grateful for your suggestion. Thank you.
- 12-27-2010, 09:42 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,383
- Blog Entries
- 7
- Rep Power
- 17
- 12-27-2010, 10:01 AM #5
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
I am using hibernate DAO insert to commit the insertion, prepared statement is my last resolve because I would very much like to see how to use DAO insert to improve the performance, lol. Sorry for my stuborn. I open connection before insertion and close connection after insert all. I cannot use the method of open and close transaction for each row of records because it will insert into the table directly, which if any error occur in the middle of insertion, my client do not want to delete the already inserted rows of data in the excel.
But of course, your idea is definitely faster... lol. But my client is lazy. So too bad for me.
- 12-27-2010, 10:36 AM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,383
- Blog Entries
- 7
- Rep Power
- 17
Leaving the connection open for all insert operations is a good thing but having the "auto commit" mode on is a show stopper. Tell your customer that s/he gets what s/he deserves. 4ms per record isn't that bad though (depending on the size of each record).
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-29-2010, 01:30 AM #7
Member
- Join Date
- Dec 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Improve my GUI!
By AJArmstron@aol.com in forum New To JavaReplies: 8Last Post: 04-27-2010, 09:17 PM -
How to Improve performance of query?
By SE123 in forum Advanced JavaReplies: 0Last Post: 10-29-2009, 09:13 AM -
:large file upload to server(chunk upload)
By tommy_725 in forum NetworkingReplies: 0Last Post: 10-16-2009, 12:21 AM -
how to improve java performance
By sunjavaboy in forum Advanced JavaReplies: 6Last Post: 06-15-2008, 05:58 AM -
how to improve the performance of JWS?
By dinesh kaushik in forum Java AppletsReplies: 0Last Post: 11-21-2007, 08:46 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks