Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 07:24 PM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-28-2007, 07:31 PM
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-28-2007, 07:35 PM
Member
 
Join Date: Jun 2007
Posts: 92
Marcus is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
export to excel diana glz Advanced Java 0 03-14-2008 12:01 AM
slow JasperReport bbq Advanced Java 3 02-11-2008 09:34 AM
Export data to xls trill Advanced Java 2 01-11-2008 10:24 AM
eclipse very slow katie Eclipse 2 11-05-2007 11:20 AM
PredifinedStatment is too slow for me? liorb Database 1 07-31-2007 05:53 PM


All times are GMT +3. The time now is 05:58 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org