Making shuffle more SQL based.