optimizes query to coincide with stream