[prev] 62 [next]

Choosing Access Methods (RelOps) (cont)

Rules for choosing ⋈ access methods:
  • R ⋈ S and R fits in memory buffers   ⇒   bnlJoin(R,S)
  • R ⋈ S and S fits in memory buffers   ⇒   bnlJoin(S,R)
  • R ⋈ S and R,S sorted on join attr   ⇒   smJoin(R,S)
  • R ⋈ S and R has index on join attr   ⇒   inlJoin(S,R)
  • R ⋈ S and no indexes, no sorting   ⇒   hashJoin(R,S)
 
(bnl = block nested loop;   inl = index nested loop;   sm = sort merge)