• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading very large file

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have to make a java program which reads data from a text file(about 10 mb in size), and than inserts that data into the database. Can i somehow make my code run faster?,
is java.nio.* faster than java.io.* ?
should i try using it?

plz advice
 
Wander Mariano
Greenhorn
Posts: 1
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the database side - not exactly what you asked about - look into batching your insert statements. The Statement interface has a couple methods to do with batching. Best of luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic