Quote:
Originally Posted by n_i
Here's a quote from the paper:
|
Beg your pardon. I thought you were referring to complexity of the query algorithm, not the plan.
Quote:
Originally Posted by n_i
I'm just saying that reading twice the rows does not necessarily take twice the time. The number of rows read may be growing exponentially as data accumulate, but query run time does not have to, and in my experience often does not.
|
For set based processors the processing of each successive row has a lower cost of the previous one. Under normal circumstances, reading twice as many rows results in twice as many rows being processed. And normally we notice little difference in processing normal queries as the data accumulates.
The point here though is that number of rows read <> the number of rows processed. In this specific case the addition of a single, average row in your inner table results in N/2 more rows being processed (the N being the number of rows in your outer table).
I am happy to script up some benchmarks if you are sufficiently motivated to put your observations up against Ben Gan's
