Download presentation
Presentation is loading. Please wait.
1
1 Classroom Exercise: Sequential Index uSuppose a block holds wx records or wy key-pointer pairs (as part of an index) uIf there are n records, how many blocks are needed to hold a data file and wa dense index? wa sparse index?
2
2 Classroom Exercise: Secondary Indexes uA block holds w3 data records or w10 key-pointer pairs or w50 pointers uUse the indirect buckets scheme uAssume on average a key appears in 10 records uHow many blocks are needed to hold 3000 records and its index structure? uHow many blocks are needed if buckets are not used?
3
3 Classroom Exercise: B-Trees uData file: wsequential, sorted on primary key w10 records per block uB-tree: wdense index wsearch key is primary key uA block holds w10 data records or w99 keys and 100 pointers (if a B-tree node) waverage B-tree node is 70% full (69 keys and 70 pointers) uWhat is the total number of blocks needed for a million-record file (on average)? uWhat is the (average) number of disk I/O's to retrieve a record given its search key?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.