网站大量收购独家精品文档,联系QQ:2885784924

斯坦福_数据库系统实现_Notes03.ppt

  1. 1、本文档共90页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
斯坦福_数据库系统实现_Notes03.ppt

CS 245 Notes 3 * Block Deletion Rx CS 245 Notes 3 * Options: (a) Immediately reclaim space (b) Mark deleted CS 245 Notes 3 * Options: (a) Immediately reclaim space (b) Mark deleted May need chain of deleted records (for re-use) Need a way to mark: special characters delete field in map CS 245 Notes 3 * As usual, many tradeoffs... How expensive is to move valid record to free space for immediate reclaim? How much space is wasted? e.g., deleted records, delete fields, free space chains,... CS 245 Notes 3 * Dangling pointers Concern with deletions R1 ? CS 245 Notes 3 * Solution #1: Do not worry CS 245 Notes 3 * E.g., Leave “MARK” in map or old location Solution #2: Tombstones CS 245 Notes 3 * E.g., Leave “MARK” in map or old location Solution #2: Tombstones Physical IDs A block This space This space can never re-used be re-used CS 245 Notes 3 * Logical IDs ID LOC 7788 map Never reuse ID 7788 nor space in map... E.g., Leave “MARK” in map or old location Solution #2: Tombstones CS 245 Notes 3 * Easy case: records not in sequence ? Insert new record at end of file or in deleted slot ? If records are variable size, not as easy... Insert CS 245 Notes 3 * Hard case: records in sequence ? If free space “close by”, not too bad... ? Or use overflow idea... Insert CS 245 Notes 3 * Interesting problems: How much free space to leave in each block, track, cylinder? How often do I reorganize file + overflow? CS 245 Notes 3 * Free space CS 245 Notes 3 * DB features needed Why LRU may be bad Read Pinned blocks Textbook! Forced output Double buffering Swizzling Buffer Management in Notes02 CS 245 Notes 3 * Swizzling Memory Disk Rec A block 1 block 2 block 1 CS 245 Notes 3 * Swizzling Memory Disk Rec A block 1 Rec A block 2 block 2 block 1 CS 245 Notes 3 * Row vs Column Store So far we assumed that fields of a record are stored contiguously (row store)... Another option is to store like fields together (

您可能关注的文档

文档评论(0)

cai + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档