Contrib: built and tested better-sqlite3 with LumoSQL

Author: danshearerCreated Jul 21, 2026Updated Jul 21, 2026

There is now a better-sqlite3 recipe and explanations in the LumoSQL tree. It runs the better-sqlite3 benchmarking and tests. The LumoSQL backend most likely to be of interest to better-sqlite3 users is likely to be LMDBv1. Node.js applications shouldn't notice any compatibility difference.

Library users may wish to have a poke at it. What do you think, @JoshuaWise ?

Reasons why this may be interesting:

  • it's generally faster
  • it's often more robust on crashes, because it uses the operating system's mmap memory paging manager
  • encryption comes as standard with LMDBv1
  • streaming backup comes as standard with LMDBv1

Reasons why it might not be for you:

  • it relies on the operating system's mmap, which isn't ideal or even doesn't exist on some embedded targets
  • it uses a different file format, because that is how LMDB works
  • LumoSQL strives to be no harder than SQLite to build and run, but we have probably got some things wrong
  • This is not yet ready for general production release, it's about kicking the tyres and tell us what you like and you don't like :-)

Things we haven't thought about...

  • how best to make this available in Node - should it be a switch to an existing sqlite3 package such as better-sqlite3? Should it be an entire separate package? Something else?
  • how best to present the at-rest encryption features to Node sqlite3 users? At the moment it's just "here's how you use libsodium, give it a key at startup"

Best,

--
Dan Shearer
[email protected] / https://shearer.org