Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing Excel in java takes hours to create.

 
Waez Ali
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a program that executes a sql and write the extract into excel sheet, the resulset of sql fetched is about 400k and whole process is taking 3 to 4 hours.

Any suggestions how I can improve the time..?

Thanks
Waez.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing is to figure out which step takes a long time so that you know whatever effort you put into optimizing gets applied to the correct place.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "400k" mean - 400000 rows? 400KB of data? Something else?

I agree with Steve that the first step is to figure what's taking up all that time - reading the data from the DB, or writing to an Excel file.
 
Debal Guha
Greenhorn
Posts: 9
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which API are you using? POI/Jxl or any other?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic