228k views
4 votes
Derive the time cost of a block nested loops join of relations R and S given the following variables, which you may or may not use all of them. Ignore the CPU time costs. R is the outer relation and the results of the join are written back to the disk.

1 Answer

3 votes

Answer:

BLOCK NESTED LOOP JOIN

WORST CASE:

=br ∗ bs + br block transfers + 2 * br seeks = (M*N*Cr)/(B-2)+|R|*|S|+P*Cw

br=no of blocks or pages containging relation r

Step-by-step explanation:

The block nested loop is used to join the of relations R and S given that these following variables, we may or may not use all of them.

BLOCK NESTED LOOP JOIN

WORST CASE:

=br ∗ bs + br block transfers + 2 * br seeks = (M*N*Cr)/(B-2)+|R|*|S|+P*Cw

br=no of blocks or pages containging relation r

User David Lechner
by
5.4k points