全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Log-structured merge tree, memtable, sorted run, read amplification?

又称: log-structured merge tree · memtable · sorted run · read amplification

Definition 21.6 University Computer Science — Year 3 · 第 21 章 — Database Storage and Indexes

A log-structured merge tree keeps recent writes in a memtable, a sorted structure in memory. A full memtable is written to disk as a sorted run, an immutable file of pairs in key order. Runs are organised in levels 0,1,2,…0, 1, 2, \ldots of growing capacity, each a size ratio TT larger than the one above; compaction (Year 2 volume), here, merges the runs of a level into the next, the newest value of a key winning, and rewrites the result. A lookup searches the memtable, then the levels from the newest; the read amplification is the number of runs, or pages, a lookup reads.

A levelled LSM tree: each level is one sorted run, T times larger than the level above; a lookup reads at most one run per level, fewer with Bloom filters.
A levelled LSM tree: each level is one sorted run, TT times larger than the level above; a lookup reads at most one run per level, fewer with Bloom filters.
在原文中阅读 →