Hacker News new | ask | show | jobs
by ComputerGuru 690 days ago
The chosen solution isn’t ideal for all cases, especially those with many or large records. It doesn’t require parsing all the bytes of a payload but it does require reading them (because it’s a sequential scan of all content).

A better solution would separate the keys from the values (à la MFT) because reading a page of flash is going to be the slowest step. If you only have to sequentially scan the header table, you have to read an order of magnitude or more less data to find the record you are searching for.

1 comments

A columnar database format might perform well out of the box in that case.

Reading more, it seems like a columnular database built on LSM trees would probably work great, since you could easily move the log around in flash to distribute write wear out, and only occasionally compact LSM tree files.

It would, but there are any small and simple enough to use in a standalone (no-OS, non-POSIX) environment?
I found https://github.com/embassy-rs/ekv after some searching, but who knows how battle tested it is.