separate sort and merge in ExternalSort