Beruflich Dokumente
Kultur Dokumente
2. Compare this to the blocked disk I/O characteristics you measured in the previous assignment. The trend/effect of page size on write and read speed is not as obvious as the blocked disk I/O experimented in previous assignment. However, some
similarities can still be seen. On a 7200RPM HDD, writes are fastest at 16kB block size. Reads are also relatively fast at 16kB block size. 3. Based on your observation, approximate the performance difference if variable length record encoding is used. Justify your answer. The performance will be lower if variable length record encoding is used. It should be around 1.5 times slower than fixed length encoding. This is because variable length encoding uses additional 500 bytes as offsets and null characters, hence in a single page I/O, the number of records written onto disk is 1.5 times lower. 4. Discuss why page based format is superior to storing records using a CSV file. a. In fixed length encoding, using page file saves memory and disk space (instead of using commas to separate fields and newline characters to separate tuples, each of 1B, we only need 1 bit for each record. b. Page based format allows database to efficiently locates a record. c. Page based format allows for half-filled page, and addition/deletion/modification of content in a page, without the need to rewrite the whole file onto disk. In CSV, when one changes some data, one needs to rewrite the entire file onto disk. d. Can commas cause problems? 5. Discuss the short comings of the way we organize pages. a. It requires the last few slots of the page to be used as indicators for used/free slots. This reduces the efficiency of space.