lisp-project-of-the-day icon indicating copy to clipboard operation
lisp-project-of-the-day copied to clipboard

lmdb

Open utterances-bot opened this issue 5 years ago • 2 comments

lmdb

https://40ants.com/lisp-project-of-the-day/2020/10/0201-lmdb.html

utterances-bot avatar Dec 09 '20 13:12 utterances-bot

Fernando recently merged a large cleanup patch from me (and there is another one coming). I think you used an older version. More importantly, LMDB has a couple of things going for it:

  • millions of reads per second
  • transactions that span multiple keys, which is often missing from nosql dbs

It's not immediately obvious, but being blazing fast at reading allows one to map data to the db in a fairly direct manner, while multi-key transactions are absolutely necessary unless eventual consistency is somehow sufficient.

As to the benchmarks, Badger seems to be a faster at random writes and slower at reads. Although I'm not sure how much database vendors should be trusted to benchmark their own.

Also, LMDB is a good fit for an application when nosql is: when there are no ad-hoc queries and it is feasible to manage consistency (e.g. foreign keys constraints) by hand.

melisgl avatar Dec 09 '20 13:12 melisgl

Yess, probably it was older version.

svetlyak40wt avatar Dec 09 '20 17:12 svetlyak40wt