In sort merge join, where is the formula for sort cost(36:18) come from? It is different from the formula for sorting in last class. It should be 2M log_{B-1}{N / B}, which is the textbook Database System Concepts uses.
@Qladstone3 жыл бұрын
Does Grace Join assume that the join keys of each table can fit entirely into memory? Suppose we hash the join keys of R. We do not need to load R entirely into memory since we can take some page and hash the join keys, then take the next page etc. However, the results of the hash need to fit into memory. We cannot prematurely write partitions of the hash results onto disk since further results may have to be inserted into these partitions.
@1오징오5 жыл бұрын
in sort-merge join, How can we sort if there's two join keys?
@陈迪-i3w5 жыл бұрын
same way. Sort two-element tuples on both sides. Then do the matching.
@Qladstone3 жыл бұрын
@陈迪's method should work for exact matches. For other join predicates, there may be further search or additional techniques required.
@JamesRouzier6 жыл бұрын
Did he really say parole officer? Did he get busted for trying to perform an illegal instruction.
@remain1stranger6 жыл бұрын
As he loved databases, he probably is addicted to ACID.
@JamesRouzier6 жыл бұрын
@@remain1stranger I think it is because he dropped ACID.