Results 1 to 3 of 3
  1. #1
    Daniel is offline Member
    Join Date
    Jun 2007
    Posts
    91
    Rep Power
    0

    Default 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

  2. #2
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default 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:

  3. #3
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default 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

  1. Export data to xls
    By trill in forum Advanced Java
    Replies: 5
    Last Post: 03-24-2011, 06:13 AM
  2. export to excel
    By diana glz in forum Advanced Java
    Replies: 0
    Last Post: 03-14-2008, 12:01 AM
  3. slow JasperReport
    By bbq in forum Advanced Java
    Replies: 3
    Last Post: 02-11-2008, 09:34 AM
  4. eclipse very slow
    By katie in forum Eclipse
    Replies: 2
    Last Post: 11-05-2007, 11:20 AM
  5. Replies: 1
    Last Post: 07-31-2007, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •