Grace Hash Join (cont)
Cost of grace hash join:
- #pages in all partition files of Rel ≅ bRel
(maybe slightly more)
- partition relation R ...
Cost =
bR.Tr + bR.Tw
= 2bR
- partition relation S ...
Cost =
bS.Tr + bS.Tw
= 2bS
- probe/join requires one scan of each (partitioned) relation
Cost = bR + bS
- all hashing and comparison occurs in memory ⇒ ≅0 cost
Total Cost = 2bR + 2bS + bR + bS = 3 (bR + bS)
|