[prev] 118 [next]

Query Evaluation in CoDbs (cont)

Example: select R.a, S.b
                from   R join S on R.a = S.x

// Assume: N tuples in R, M tuples in S
for i in 0 .. N-1 {
   for j in 0 .. M-1 {
      if (a[i] == x[j])
         append (i,j) to IndexList
   }
}
for each (i,j) in IndexList {
   add (aR[i], bS[j]) to Results
}