You could scan through and make a new file for each id and put the data for that id in the file. Then finding all data for an ID is just opening the right file and reading. I would recommend a database first but sometimes thats just not doable :-)
The orignal parse for this method might be slower but then seperate runs would be quicker. Unlike a hash solution this doesn't put everything into memory which means its persistent between different runs of the program.
In reply to Re: sort large file
by eric256
in thread sort large file
by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |