This question is a continuation of Sorting 20GB of data.
Nobody mentioned TDictionary in the answers to the previous question. Why? Will TDictionary choke with such large data?
This time the input data is different. One record is like this:
1 abc
2 00000000
3 00000000
4 00000000
In my record, the first row contains the data that has to be sorted. Rows 2, 3, 4 are not relevant for sorting. The first row could be anything between 10-2000 bytes (chars). Total number of entries could be in the tens of million range.
I am thinking in putting the first row into the Dictionary and the address in file (offset) where the record starts.
Once the dictionary is sorted, I only have to go to the offset, read the record and copy it into the new (sorted) file.
So, the question is: Is TDictionary suitable for such a large number of entries?