15.11

Suppose a query retrieves only the first \(K\) results of an operation and terminates after that. Which choice of demand-driven or producer-driven pipelining (with buffering) would be a good choice for such a query? Explain your answer.


Demand driven is better, since it will only generate the top \(K\) results. Producer driven may generate a lot more answers, many of which would not get used.