[prev] 42 [next]

Exercise 8: Nested Loop Join Cost (cont)

If the query in the above example was:

select j.code, j.title, s.name
from   Student s
       join Enrolled e on (s.id=e.student)
       join Subject j on (e.subj=j.code)

how would this change the previous analysis?

What join combinations are there?

Assume 2000 subjects, with cJ = 10

How large would the intermediate tuples be? What assumptions?

Compute the cost (# pages fetched, # pages written) for N = 22