sorting lines of an enormous file.txt in java

后端 未结 6 1045
小蘑菇
小蘑菇 2020-12-10 16:08

I\'m working with a very big text file (755Mb). I need to sort the lines (about 1890000) and then write them back in another file.

I already noticed that discussion

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 16:58

    Maybe u can use perl to format the file .and load into the database like mysql. it's so fast. and use the index to query the data. and write to another file.

    u can set jvm heap size like '-Xms256m -Xmx1024m' .i hope to help u .thanks

提交回复
热议问题