@@ -104,28 +104,28 @@ The documentation provides two measures of complexity:
104104The complexities are described in terms of the following variables and
105105constants:
106106
107- - The variable * n * refers to the number of * physical* table entries. A
107+ - The variable $ ` n ` $ refers to the number of * physical* table entries. A
108108 * physical* table entry is any key–operation pair, e.g., ` Insert k v `
109109 or ` Delete k ` , whereas a * logical* table entry is determined by all
110- physical entries with the same key. If the variable * n * is used to
110+ physical entries with the same key. If the variable $ ` n ` $ is used to
111111 describe the complexity of an operation that involves multiple tables,
112112 it refers to the sum of all table entries.
113113
114- - The variable * o * refers to the number of open tables and cursors in
114+ - The variable $ ` o ` $ refers to the number of open tables and cursors in
115115 the session.
116116
117- - The variable * s * refers to the number of snapshots in the session.
117+ - The variable $ ` s ` $ refers to the number of snapshots in the session.
118118
119- - The variable * b * usually refers to the size of a batch of
119+ - The variable $ ` b ` $ usually refers to the size of a batch of
120120 inputs/outputs. Its precise meaning is explained for each occurrence.
121121
122- - The constant * B * refers to the size of the write buffer, which is a
122+ - The constant $ ` B ` $ refers to the size of the write buffer, which is a
123123 configuration parameter.
124124
125- - The constant * T * refers to the size ratio of the table, which is a
125+ - The constant $ ` T ` $ refers to the size ratio of the table, which is a
126126 configuration parameter.
127127
128- - The constant * P * refers to the the average number of key–value pairs
128+ - The constant $ ` P ` $ refers to the the average number of key–value pairs
129129 that fit in a page of memory.
130130
131131#### Disk I/O cost of operations <span id =" performance_time " class =" anchor " ></span >
@@ -273,22 +273,22 @@ schedule is listed as N/A.
273273</tbody >
274274</table >
275275
276- (\* The variable * b * refers to the number of entries retrieved by the
276+ (\* The variable $ ` b ` $ refers to the number of entries retrieved by the
277277range lookup.)
278278
279279TODO: Document the average-case behaviour of lookups.
280280
281281#### In-memory size of tables <span id =" performance_size " class =" anchor " ></span >
282282
283283The in-memory size of an LSM-tree is described in terms of the variable
284- * n * , which refers to the number of * physical* database entries. A
284+ $ ` n ` $ , which refers to the number of * physical* database entries. A
285285* physical* database entry is any key–operation pair, e.g., ` Insert k v `
286286or ` Delete k ` , whereas a * logical* database entry is determined by all
287287physical entries with the same key.
288288
289- The worst-case in-memory size of an LSM-tree is * O * ( * n * ) .
289+ The worst-case in-memory size of an LSM-tree is $ ` O(n) ` $ .
290290
291- - The worst-case in-memory size of the write buffer is * O * ( * B * ) .
291+ - The worst-case in-memory size of the write buffer is $ ` O(B) ` $ .
292292
293293 The maximum size of the write buffer on the write buffer allocation
294294 strategy, which is determined by the ` confWriteBufferAlloc ` field of
@@ -299,7 +299,7 @@ The worst-case in-memory size of an LSM-tree is *O*(*n*).
299299 The maximum size of the write buffer is the maximum number of entries
300300 multiplied by the average size of a key–operation pair.
301301
302- - The worst-case in-memory size of the Bloom filters is * O * ( * n * ) .
302+ - The worst-case in-memory size of the Bloom filters is $ ` O(n) ` $ .
303303
304304 The total in-memory size of all Bloom filters is the number of bits
305305 per physical entry multiplied by the number of physical entries. The
@@ -318,15 +318,15 @@ The worst-case in-memory size of an LSM-tree is *O*(*n*).
318318 The false-positive rate scales exponentially with the number of bits
319319 per entry:
320320
321- | False-positive rate | Bits per entry |
322- | ---------------------| ----------------|
323- | 1 in 10 | ≈ 4.77 |
324- | 1 in 100 | ≈ 9.85 |
325- | 1 in 1, 000 | ≈ 15.79 |
326- | 1 in 10, 000 | ≈ 22.58 |
327- | 1 in 100, 000 | ≈ 30.22 |
321+ | False-positive rate | Bits per entry |
322+ | --------------------------- | ---- ----------------|
323+ | $ ` 1\text{ in }10 ` $ | $ ` \approx 4.77 ` $ |
324+ | $ ` 1\text{ in } 100` $ | $ ` \approx 9.85 ` $ |
325+ | $ ` 1\text{ in }1{,} 000` $ | $ ` \approx 15.79 ` $ |
326+ | $ ` 1\text{ in }10{,} 000` $ | $ ` \approx 22.58 ` $ |
327+ | $ ` 1\text{ in } 100{,} 000` $ | $ ` \approx 30.22 ` $ |
328328
329- - The worst-case in-memory size of the indexes is * O * ( * n * ) .
329+ - The worst-case in-memory size of the indexes is $ ` O(n) ` $ .
330330
331331 The total in-memory size of all indexes depends on the index type,
332332 which is determined by the ` confFencePointerIndex ` field of
@@ -346,7 +346,7 @@ The worst-case in-memory size of an LSM-tree is *O*(*n*).
346346 a negligible amount of memory for tie breakers. The total in-memory
347347 size of all indexes is approximately 66 bits per memory page.
348348
349- The total size of an LSM-tree must not exceed 2< sup >41</ sup > physical
349+ The total size of an LSM-tree must not exceed $ ` 2^{41} ` $ physical
350350entries. Violation of this condition * is* checked and will throw a
351351` TableTooLargeError ` .
352352
0 commit comments