running a large sort optimization