[prev] 112 [next]

Query Evaluation in CoDbs (cont)

If slices are sorted differently, more complicated
  • scan based on tid values
  • at each step, look up relevant entry in slice
Example: select a,b,c from R(a,b,c,d,e)

Assume: each column contains N values
for tid in 0 .. N-1 {
   x = fetch(a,tid)  // entry with tid in slice containing a
   y = fetch(b,tid)  // entry with tid in slice containing b
   z = fetch(c,tid)  // entry with tid in slice containing c
   add (x,y,z) to Results
}

Potentially slow, depending on how fetch() works.