Query plan iterator