sqlnano: A specialized Zig-native SQL engine for append-heavy workloads
DatabaseComments
The use of rowid-tables is the key here: it essentially turns the B-tree into a dense index. This minimizes the random I/O typically associated with B-tree inserts, provided the inserts are monotonically increasing.
If it relies on monotonically increasing rowids, how does the engine handle out-of-order appends? I am curious if it forces a sort or just accepts the fragmentation penalty.
Does the throughput actually stay flat... or does it dip when the B-tree nodes need splitting? I wonder if the Zig implementation handles those spikes differently...
Most append-heavy workloads move toward LSM-trees for a reason. B-trees, even SQLite-compatible ones, usually struggle with write amplification as the tree depth increases.
Who needs an LSM-tree for a simple embeddable logger? The overhead of compaction in LSMs is a nightmare for RSS. Isn't a lean B-tree more predictable for low-memory environments?