Results 1 to 3 of 3
- 06-28-2007, 06:24 PM #1
Member
- Join Date
- Jun 2007
- Posts
- 91
- Rep Power
- 0
Export query result, procces is to slow
I have to create an export of a query result, the number of rows always are more than 2 Millons. My proccess starts through a JSP file.
The application is running into a Apache Tomcat 5.5
I have tried to write a txt file but the procces is to slow
I don't know if you can tell me some tips ?
Daniel:o
- 06-28-2007, 06:31 PM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 114
- Rep Power
- 0
RE: Export query result, procces is to slow
2 millon rows is alot to export no matter what you do. One suggestion would be to split up the query into multiple threads. Basically you create a thread to do the query and some number of threads to write out separate files. This isn't easy but you'd then be limited by the I/O of the system and not anything that java is doing.
Albert:rolleyes:
- 06-28-2007, 06:35 PM #3
Member
- Join Date
- Jun 2007
- Posts
- 92
- Rep Power
- 0
RE: Export query result, procces is to slow
I guess that an important question would be what do you do with data after it is exported? If you are reading it with a different Java process then you might get some performance gains with serialization.
However, that would require Java to read the file. If this data is to be imported to something else then can you skip the export to file altogether and write it directly to the destination?
Lastly, do you know where your bottleneck really is? Is it Java or the database or the file I/O or what? Before going too far in optimizing the code you might want make sure that you are optimizing the correct thing.
Marcus
Similar Threads
-
Export data to xls
By trill in forum Advanced JavaReplies: 5Last Post: 03-24-2011, 05:13 AM -
export to excel
By diana glz in forum Advanced JavaReplies: 0Last Post: 03-13-2008, 11:01 PM -
slow JasperReport
By bbq in forum Advanced JavaReplies: 3Last Post: 02-11-2008, 08:34 AM -
eclipse very slow
By katie in forum EclipseReplies: 2Last Post: 11-05-2007, 10:20 AM -
PredifinedStatment is too slow for me?
By liorb in forum JDBCReplies: 1Last Post: 07-31-2007, 04:53 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks