Reverted to the CheckpointNumber for sorting in the GetFrom query, added the CheckpointNumber to the compound index that mongo should use. This avoids the scanAndSort problem in query.