issues
search
CoreyKaylor
/
Lightning.NET
.NET library for LMDB key-value store
Other
397
stars
82
forks
source link
Add documentation about common patterns and pitfalls
#130
Open
AlgorithmsAreCool
opened
3 years ago
AlgorithmsAreCool
commented
3 years ago
Topics
LMDB Basics
Overview of concepts and terms
Usage scenarios
Common problems and limitations (find some by looking at github issues)
Max Key size (511 bytes by default)
How to use Async/Await safely (and when not to use it)
Picking good config defaults
MaxReaders
MapSize
MaxDatabases
DupSort and DupFixed
DupSort Values are limited to 511 bytes :/
Getting the best performance
Performance expectations and knowing what things cost
Picking good keys
Integer keys with
IntegerKey
set on database if possible
Understanding write amplification and overhead
Small records can use more space than expected
Hot to use strings as keys efficiently
Importance of ReadOnly vs Normal Transactions
Batching Writes
Compression?
The seductive danger of NO_SYNC
Use the cursor API for faster reads (0-copy,
Impact of lots of Databases
cache your db handles instead of reopening everytime
DB Health and maintenance
When should you consider reallocating the DB to defragment
Advanced nonsense (might never get around to writing these)
How to build your own indexes
How to grow/reallocate the DB as quickly as possible
Coordinating multiple lmdb environments
Sharding to allow incremental reallocations
Topics
LMDB Basics
Getting the best performance
IntegerKey
set on database if possibleAdvanced nonsense (might never get around to writing these)