News for hackers. Stuff that matters.
Re:LiteTree: SQLite with Branches by tripue on Wednesday August 29, 2018 @01:32AM (#17865912)
Interesting project. How do you achieve theses performances ?
Re:LiteTree: SQLite with Branches by kroggen on Wednesday August 29, 2018 @02:16AM (#17866073)
I guess that LMDB is the root of the outstanding peformance. Check it out, it is an innovative key/value database that uses a memory-mapped db file, the OS cache, zero-copy on reads and copy-on-write.
Re:LiteTree: SQLite with Branches by nickodell on Wednesday August 29, 2018 @02:44AM (#17866186)
Are you really comparing the same thing, then? Do you have the same consistency guarantees if the system shuts down unexpectedly?
Re:LiteTree: SQLite with Branches by kroggen on Wednesday August 29, 2018 @03:02AM (#17866278)
When I saw the results I did not believe, so I reviewed the benchmark code. It is basically the same SQL commands being run in normal SQLite and with the branching enabled.

Yes, LMDB is proved to be safe. It is used in many apps and even other DB implementations, including Monero.

What I have not tested is SQLite with WAL (Write-Ahead Log). In this case it may be faster than the default journal mode.

Re:LiteTree: SQLite with Branches by bdukic on Wednesday August 29, 2018 @06:39AM (#17867174)
Yes, it would be nice to see results with WAL, as it's significantly faster in most cases.
Re:LiteTree: SQLite with Branches by snaky on Wednesday August 29, 2018 @05:38AM (#17866959)
Maybe libmdbx would be interesting too.

https://github.com/leo-yuriev/libmdbx

Re:LiteTree: SQLite with Branches by afrisch on Wednesday August 29, 2018 @03:17AM (#17866331)
According to Wikipedia[1], SQLightning -- a port of Sqlite using LMDB -- was 20x faster than original sqllight. It could thus be interesting to compare LiteTree with SQLightning.

[1] https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Databa...

Re:LiteTree: SQLite with Branches by kroggen on Wednesday August 29, 2018 @03:34AM (#17866408)
Indeed. But the last version of SQLightning is using SQLite 3.7. It would be useful to have an updated version. I was going to update it but then I decided to implement LiteTree in another way, using pages instead of rows. This is because our customers at Blocko/Aergo prefer higher performance over small storage.