1,313 views
2 votes
2 votes
Consider a relation R with 2000 records and relation S with 500 records. Size of each record is 5 Byte and block size is 100 Byte, then minimum number of block access that are needed block nested loop join.

I think its answer should be 2525.

2 Answers

0 votes
0 votes

watch this video for concept https://www.youtube.com/watch?v=rT4eI3p3tVk

Here, S is outer relation and R is inner relation. For a minimum number of block accesses, outer relation should be smaller.

Number of records in each block =  (Size of Block)/(Size of Record) = 100B/5B = 20

NR = Total Number of records in R = 2000

BR = Number of blocks in R = 2000/20 = 100

NS = 500

BS = 500/20 =25

Number of total block accesses = BS + BS*BR (for Block nested loop join) = 25 + 25*100 = 2525

Related questions

1 votes
1 votes
0 answers
1
Pawan Kumar 2 asked Jan 2, 2018
563 views
Are block transfers and block access same ?
1 votes
1 votes
0 answers
2
raviyogi asked Nov 10, 2017
389 views
please cjheck this
1 votes
1 votes
1 answer
4
Aditya Bahuguna asked Jan 4, 2018
422 views