Move the system query out of the chunk processing. Simplify it into a tuple rank comparison.