Sorting huge amounts of data using external storage like files