Measurements
What an open, a point read and an index cost from a thousand records to a million, in one table per store.
One record, three stores, one machine. The record is three 60-byte addresses, an origin, a media type and a payload of about 55 bytes, so the differences below are the formats.
- Ktema, optional index
- Append log
- SQLite
| Ktema, optional index | Append log | SQLite | |
|---|---|---|---|
| 1k | 0.346 | 0.063 | 0.051 |
| 10k | 0.346 | 0.5 | 0.321 |
| 100k | 0.346 | 4 | 2.998 |
| 1M | 0.346 | 64 | 8.348 |
- Ktema
- Append log
- SQLite
| Ktema | Append log | SQLite | |
|---|---|---|---|
| 1k | 0.25 | 50.083 | 257.458 |
| 10k | 0.542 | 515 | 220.875 |
| 100k | 0.792 | 7,711.208 | 225.625 |
| 1M | 1.5 | 120,768.958 | 227.417 |
- Ktema
- Append log
- SQLite
| Ktema | Append log | SQLite | |
|---|---|---|---|
| 1k | 0.959 | 0.042 | 2.5 |
| 10k | 1.125 | 0.042 | 2.5 |
| 100k | 1.333 | 0.042 | 2.5 |
| 1M | 1.792 | 0.042 | 2.625 |
- Ktema
- Append log
- SQLite
| Ktema | Append log | SQLite | |
|---|---|---|---|
| 1k | 106.792 | 5.25 | 7.708 |
| 10k | 1,421.25 | 41.167 | 59.042 |
| 100k | 23,944.625 | 494.583 | 587.083 |
| 1M | 322,745.333 | 5,313.375 | 11,916.542 |
- Ktema, point read
- Ktema, a tenth
- SQLite, point read
- SQLite, a tenth
| Ktema, point read | Ktema, a tenth | SQLite, point read | SQLite, a tenth | |
|---|---|---|---|---|
| 1k | 0.003 | 0.551 | 0.012 | 0.039 |
| 10k | 0.007 | 7.932 | 0.016 | 0.293 |
| 100k | 0.01 | 104.55 | 0.02 | 2.813 |
| 1M | 0.019 | 1,548.735 | 0.023 | 27.922 |
What the three are
| Ktema | Append log | SQLite | |
|---|---|---|---|
| What it is | An addressable history, written where the event happened | A record of what happened, and nothing else | Rows a program queries and changes |
| Operating system | Not required | Required | Required |
| Filesystem | Not required; the medium is the volume | Required | Required |
| How an address is found | Computed from the record itself | A map entry per record, rebuilt at every mount | An index on disk, walked at each read |
| Bytes per record, at 1M | 495 | 257 | 293 |
| Index the volume holds, at 1M | 354 kB, optional; not built in this run | 64 MB, one entry per record | 8.3 MB, page cache |
| Append one record, at 100k | 5.0 µs | 1.7 µs | 12.8 µs |
| Open, at 100k | 0.79 µs | 7.71 ms | 225.63 µs |
| One record by address, at 100k | 1.33 µs, reading 11 kB | 0.04 µs | 2.50 µs, reading 20 kB |
| A tenth, by address, at 100k | 24 ms, reading 2.2 times the volume | 0.49 ms | 0.59 ms, reading 2.8 MB |
| Where it stops | A volume of 4 GiB, about 8,676,701 records | When the address map no longer fits the memory it has | Where its filesystem does not exist |
| Right tool when | The host has no operating system and the history is the product | The only question is what happened, on a host of a few kilobytes | The data changes and the questions are not known in advance |
Reading the times
The host rows are the engine’s reference path: no record maps, no block cache, no index, so a box query walks the log. A tenth of the addresses at a hundred thousand records reads 2.2 times the volume, which is where its time comes from.
The peers run with an operating system, a filesystem and a warm page cache. Neither runs on a part without one, and the log’s address map stops fitting before the volumes it serves. The engine’s case is that tier.
The append figure is where runs spread widest: at a hundred thousand records the engine lands near 5 µs and the database near 12, while the other three times stayed within a tenth of their value.
The path this page does not measure
A volume opens two ways. The reference path answers by reading the log, which is what every number here measures. The cached path builds record maps at 394 to 406 bytes a record on a 32-bit target, with the structural index at about 354 kB, so a read comes from memory. A part with 64 kB cannot take it.
Both paths hold the same record in the same format. The choice moves the cost between the medium and the memory.
A box on any axis
A multi-dimensional query fixes ranges on some axes and asks for the records inside. One box over a tenth of one axis, at a million records, through each store’s own query path:
| Shape | Answers | Time | Bytes read | Index |
|---|---|---|---|---|
| Ktema, the leading axis | 98,968 | 322.7 ms | 1.5 GB | none |
| Ktema, an inner axis | 111,720 | 323.6 ms | 1.5 GB | none |
| SQLite, the key range | 100,000 | 11.9 ms | 27.9 MB | none |
| SQLite, an inner axis | 119,160 | 235.6 ms | 279.0 MB | none |
| SQLite, an inner axis, indexed | 119,160 | 70.2 ms | 41.4 MB | 135.3 MB |
- Ktema
- SQLite
| Ktema | SQLite | |
|---|---|---|
| Ktema, either axis | 0 | 0 |
| 0 | 0 |
What a box costs to hold
The engine answers both shapes in one pass and the same bytes, because the address is computed. The database’s inner-axis row costs 10.0 times the reads and 19.8 times the time, and an index of 135.3 MB on a 279.0 MB volume makes it cheap again.
The engine’s flat cost is the namespace, walked once per query: 1.5 GB at a million records. A listing compares each key once per segment, and a listing begins at a prefix, which a set of ranges is not.
Per answer: 16.0 kB read against 0.3 kB.
A volume stops at 4 GiB, 8,676,701 records at 495 bytes each. A particle-physics ntuple is about a hundred times that, so the unit here is the volume.
What a read costs the medium
The engine counts the reads it asks the medium for. The count is 1 framing read and 3 fact reads at any volume, and a prefix read does not read a record.
- 64 records
- 11172 records
| 64 records | 11172 records | |
|---|---|---|
| Framing | 1 | 1 |
| Fact | 3 | 3 |
| Listing | 0 | 0 |
| Records | Framing read | Fact read | Listing |
|---|---|---|---|
| 64 | 1 read | 3 reads | 0 byte reads |
| 11172 | 1 read | 3 reads | 0 byte reads |
The read contract
174 times the volume changes neither count. The listing issues no byte read, which is the contract’s “does not read a record”; the directory walk is not a call this counter sees. The bytes behind the reads do grow, from 2.7 kB at a thousand records to 19.9 kB at a million.
ktema 8b5e3a3+, ktema-bench 1000 10000 100000 1000000 and bench/8f7da4a+/host/peer-baselines/2026-11-21T10:56:43Z · Apple arm64, 8 Performance cores, macOS 15.7.1 · 2026-11-21 · median of 51 samples · SQLite 3.43.2, WAL, synchronous=NORMAL, cache_size=8 MB. The append log is a fixed-width frame per record plus an address map, which is what an integrator writes without a database. The engine's rows are the corpus record bench/8b5e3a3+/host/volume-sweep/2026-11-21T10:53:53Z.