OOPS
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
Question 27
|
A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.
If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data are
800000
|
|
40080
|
|
32020
|
|
100
|
Question 27 Explanation:
To minimize block accesses, we have to put that table outside having less records because for each outer record one block accesses inside will be required.
Therefore,
putting 2nd table outside,
for every 400 records {
80 block accesses in first table
}
= 32000 blocks
and also 20 blocks accesses of outer table.
So, answer comes out to be,
32000 + 20 = 32020
Therefore,
putting 2nd table outside,
for every 400 records {
80 block accesses in first table
}
= 32000 blocks
and also 20 blocks accesses of outer table.
So, answer comes out to be,
32000 + 20 = 32020
Correct Answer: C
Question 27 Explanation:
To minimize block accesses, we have to put that table outside having less records because for each outer record one block accesses inside will be required.
Therefore,
putting 2nd table outside,
for every 400 records {
80 block accesses in first table
}
= 32000 blocks
and also 20 blocks accesses of outer table.
So, answer comes out to be,
32000 + 20 = 32020
Therefore,
putting 2nd table outside,
for every 400 records {
80 block accesses in first table
}
= 32000 blocks
and also 20 blocks accesses of outer table.
So, answer comes out to be,
32000 + 20 = 32020
Subscribe
Login
0 Comments