The sort needs to be in ascending order based on the first 2 fields of the record. I will need to sort 100 million records. Currently, I'm using the File::Sort module and getting through about 4 million records in about 8 minutes, but its single threaded. Seems like I need to implement some sort of Merge/Sort, where I sort the smaller files and then merge. Has anybody implemented a perl solution that can handle this many records per file? I'm running on a Sun F4800, 8 CPUs, 2GB RAM - Solaris 8.18000 40000600000 1.2 2.3 2.2 5.6 7.2 20000 40000600001 2.2 3.5 3.4 5.6 3.5 15000 40000600003 2.2 3.5 3.4 5.6 3.5 20000 40000600006 2.2 3.5 3.4 5.6 3.5 20000 40000600010 2.2 3.5 3.4 5.6 3.5 20000 40000600015 2.2 3.5 3.4 5.6 3.5 20000 40000600021 2.2 3.5 3.4 5.6 3.5 20000 40000600028 2.2 3.5 3.4 5.6 3.5 20000 40000600036 2.2 3.5 3.4 5.6 3.5 20000 40000600045 1.2 2.3 2.2 5.6 7.2 19000 40000600000 1.2 2.3 2.2 5.6 7.2 19000 40000600001 1.2 2.3 2.2 5.6 7.2 19000 40000600003 1.2 2.3 2.2 5.6 7.2 19000 40000600006 1.2 2.3 2.2 5.6 7.2 20000 40000600010 2.2 3.5 3.4 5.6 3.5 19000 40000600015 2.2 3.5 3.4 5.6 3.5 20000 40000600021 2.2 3.5 3.4 5.6 3.5 19000 40000600028 2.2 3.5 3.4 5.6 3.5 20000 40000600036 2.2 3.5 3.4 5.6 3.5 19000 40000600045 2.2 3.5 3.4 5.6 3.5
Edit: Added <code> tags around the data. larsen
In reply to Fast/Efficient Sort for Large Files by mjmaresca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |