知识卡片
压缩粒度影响随机读
按文件压缩若缺少足够细的定位元数据,查一个页也可能要访问并解码大段数据,更新会扩大重编码范围。每页独立压缩可配合页载入或刷盘,但压缩边界若跨磁盘块,仍需读多块。按行或列压缩业务字节,则可把编解码与物理页操作分离。实际收益取决于压缩率、压缩和解压 CPU、内存及读取对齐。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 4. Implementing B-Trees Compression · 查看原书依据
An alternative is to compress data page-wise. It fits our discussion well, since the algorithms we’ve been discussing so far use fixed-size pages. Pages can be compressed and uncompressed independently from one another, allowing you to couple compression with page loading and flushing.
参考来源
- 位置:《Database Internals》Chapter 4. Implementing B-Trees(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch04.html#b_tree_compression,段 85)
- 结论依据:原文从独立页压缩引到磁盘块传输和额外读取,邻段列举文件和行列粒度。
- 原始内容:An alternative is to compress data page-wise. It fits our discussion well, since the algorithms we’ve been discussing so far use fixed-size pages. Pages can be compressed and uncompressed independently from one another, allowing you to couple compression with page loading and flushing.