Optimize another console query to leverage partitioning