external sorting的一个问题# JobHunting - 待字闺中
g*v
1 楼
问题是在第5步,比如, 1G data, 100M memory,
1: divide into 10 parts.
2: sort 10 parts each in memory then write back to hard drive.
3: read 10M from each part (100M)
4: merge sort the 10 10M and write back the first 10M.
5: get 10M from one of the 100M parts in hard drive
问题是现在有10个100M被排序好了保存在硬盘上,然后每个100M取出10M在内存里面排序,然后把第1
个10M存在硬盘上,然后需要从那些100M里面取10M,问题是取10M的时候从哪个100M里面取?
谢谢
1: divide into 10 parts.
2: sort 10 parts each in memory then write back to hard drive.
3: read 10M from each part (100M)
4: merge sort the 10 10M and write back the first 10M.
5: get 10M from one of the 100M parts in hard drive
问题是现在有10个100M被排序好了保存在硬盘上,然后每个100M取出10M在内存里面排序,然后把第1
个10M存在硬盘上,然后需要从那些100M里面取10M,问题是取10M的时候从哪个100M里面取?
谢谢