COUNTING THE NUMBER OF GETNEXT CALLS ==================================== Slide 52 of Notes on SQL Query Processing ========================================== Suppose: * Left Table 10 records * Right Table 100 records Then, the Total Number of GetNext Calls is: 10+1 for the TableScan on the Left Table + 10x(100+1) for the TableScan on the Right Table + (10x100) + 1 for the Join Operator Here: * We are assuming that the join is a Cartesian Product that will return all combinations of records in the join result. That is, the join result will have 10x100 records. * All occurences of "1" in the above counting are due to EOT Slide 53 of Notes on SQL Query Processing (Example 1: Left-Deep Plan) ========================================== Suppose: * R1 has 10 records * R2 has 100 records * R3 has 1000 records Then, the Total Number of GetNext Calls is: Edge a : (10x100x1000) + 1 Edge b : (10x100) + 1 Edge c : (10x100)x(1000+1) Edge d : 10+1 Edge e : 10x(100+1) Slide 54 of Notes on SQL Query Processing (Example 2: Right-Deep Plan) ========================================== Edge f : (10x100x1000) + 1 Edge g : 1000 + 1 Edge h : 1000 x ((10x100) + 1) Edge i : Edge j : 1000 x (10 x (100 + 1)) ==> pipelining implementation (10 x (100 + 1)) ==> materialization implementation