Transcript

Fan Qi Database Lab 1, com1 #01-08 CS3223 Tutorial 4 Block I/O Sorting 1 block for output Selection Access: Table Scan Index Scan Index Seek Index Intersection Index Access: B+ Tree : range and equality Hash : equality only Cost B+ Tree Navigation cost Leaf page scan cost RID look up cost Hash Index Chain Cost (Reading Bucket Page into Memory) RID look up cost Question 1 Disk 1280 Memory in out Question 1 Take-away points Block I/O reduces sorting time Diminishing return at some point, why? In practice, read/write block are of the same size SortTime 319-Merge640,000,000ms 256-Merge, 1 in 64 out344,687,500ms 16-Merge, 16 in 64 out126,875,000ms 8-Merge, 32 in 64 out135,156,250ms 4-Merge,64 in 64 out195,500,000ms Question 3 1. Table Scan Disk Question 3 pr 250 pages Rid Look up to get name Question 3 p r 250 pages500 pages Intersect Disk Rid Look up to get name Question 3 Disk p 200 pages Rid Look up to get name for each record Question 4


Recommended