0 votes 0 votes Databases databases indexing + – Abhishek Kumar Singh asked Dec 23, 2017 Abhishek Kumar Singh 520 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Shubhanshu commented Dec 23, 2017 reply Follow Share Block Factor of DB table = 22 Formula for Block factor of DB table = $\frac{\text{Block size}}{\text{Size of each record}} = \frac{4KB}{1KB}$ Number of blocks required at DB table level = $\frac{2^{30}}{2^2} = 2^{28}$ Formula for Block factor of Index table = $\frac{\text{Block size}}{\text{Key + Pointer size}}$ Block factor Index table :- $\frac{2^{12}}{2+2} = 2^{10}$ Number of Block required at 1st level index = $\frac{\text{Number of entries}}{\text{Block factor of Index table}} = \frac{2^{28}}{2^{10}} = 2^{18}$ Number of Block required at 2nd level index = $\frac{\text{Number of entries}}{\text{Block factor of Index table}} = \frac{2^{18}}{2^{10}} = 2^{8}$ Number of Block required at 3rd level index = $\frac{\text{Number of entries}}{\text{Block factor of Index table}} = \frac{2^{8}}{2^{10}} = 1$ Because in each case we are taking ceil value. So, in total it is $2^{18} + 2^8 + 1$ Closet option is 2^20. 4 votes 4 votes Abhishek Kumar Singh commented Dec 23, 2017 reply Follow Share @subhanshu why are you using multi level indexing. 0 votes 0 votes Shubhanshu commented Dec 23, 2017 reply Follow Share Becuase it is mentioned in the question "sparse index". 0 votes 0 votes hsd31196 commented Dec 31, 2017 reply Follow Share But primary index or cluster index is also sparse then why multilevel used ? 0 votes 0 votes Shubhanshu commented Dec 31, 2017 reply Follow Share @hsd31196 The very first level (which is near to DB table is the sparse index as per question says) and then we used the general implementation. 0 votes 0 votes Please log in or register to add a comment.