- 1、本文档共31页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
DatabaseDesignandTheEntity-RelationshipModel.ppt
Database Design andThe Entity-Relationship Model Lecture 21 RG - Chapter 2 Administriva Homework 4 Due One Week From Today Midterm is graded Exam Summary Average: 74.5 Max: 93.5 Min: 36.5 Std Dev: 11.6 Exam Details Section: Low – High / Total (Average) 1: External Sorting 10 – 24 / 24 (18) 2: Query Execution 17 – 43 / 44 (36) 3: Query Optim. 6.5 – 29 / 32 (20) Section 1: External Sorting For all questions in this section, assume that you have 96 pages in the buffer pool, and you wish to sort EMP by Ename. Using the general external sort, how many sorting passes are required? (6pts) #passes = 1 + Ceil(log(B-1)(N/B)) = 1 + Ceil(log(95)(10,000/96)) = 1 + 2 = 3 What is the I/O cost of doing this sort? (6pts) I/O Cost = 2N * (# passes) = 20,000 * 3 Section 1 (cont) Database systems sometimes use “blocked I/O” because reading a block of continuous pages is more efficient that doing a separate I/O for each page. Assume that in our computer system, it is much more efficient to read and write blocks of 32 pages at a time, so all reads and writes from files must be in blocks of 32 pages (and if a file has less than 32 pages, it is padded with blank pages). Consider doing external sort with blocked I/O, which gets faster I/O at the expense of more sorting passes. If the database must read and write 32 pages at a time, how many sorting passes are required? Show either the formula you use, or the temp file sizes after each pass. (4pts) Pass 0: 105 runs of 96 pages Pass 1: 2-way merge 96 + 96 - result is 53 runs of 192 pages Pass 2: 2-way merge of 192 + 192 - result is 27 runs of 384 pages Pass 3: - result is 14 runs of 768 pages, Pass 4: - result is 7 runs 1536 pages, Pass 5: - result is 4 runs 3072 pages, Pass 6: - result is 2 runs of 6144, Pass 7: - result is 10,000 8 passes total Section 1 (cont) Blocked I/O is used because reading a 32block is faster than 32 separate 1I/Os. For each sorting pass, you still must read and write every page in the file, but
您可能关注的文档
- ationsofNilssonMean-fieldPlusExtendedPairingModel.ppt
- Atoosimplemodelforproteinfolding.ppt
- BarnardosDomesticViolenceRiskAssessmentModelBy.ppt
- BigRedTorsoModel.doc
- Biology46057220ModelBasedStatisticsinBiology.ppt
- BirthOrderonMotorCoordinationDevelopingaModelfo.ppt
- BlueprintforChangeAComprehensiveModelfortheIdentif.ppt
- Bohrmodelandelectronconfiguration.ppt
- BSMORBlockStructure-preservingModelOrderReduction.ppt
- BuildinganIOModel.ppt
- 上课《归园田居(其一)》课件28张.pptx
- 色彩的魅力课件55.ppt
- 山水田园诗导学练习鉴赏.ppt
- 部编版《白鹭》课件.pptx
- 《Excel在财务中的应用》项目七 全面预算编制方法与应用 教学课件.pptx
- 《Excel在财务中的应用》项目六 利润管理决策模型与应用 教学课件.pptx
- 《Excel在财务中的应用》项目五 运营资金的管理 教学课件.pptx
- 《Excel在财务中的应用》项目四 项目投资管理决策与应用 教学课件.pptx
- 《Excel在财务中的应用》项目三 筹资管理决策模型与应用 教学课件.pptx
- 《Excel在财务中的应用》项目二 Excel 常用函数基础 教学课件.pptx
文档评论(0)