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)
for tid in 0 .. N-1 {
x = fetch(a,tid)
y = fetch(b,tid)
z = fetch(c,tid)
add (x,y,z) to Results
}
|
Potentially slow, depending on how fetch() works.
|