Go Apache-2.0

lotusdb

Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree.

L

lotusdblabs

Dernière activité 27 août 2026
lotusdblabs/lotusdb

2,3 k

étoiles

187

forks

17

issues ouvertes

bptreedatabasegolangkv-storelsm-treestorage

Ce README est souvent en anglais.

lotusdb-logo.png

What is LotusDB

LotusDB is the most advanced key-value store written in Go, extremely fast, compatible with LSM tree and B+ tree, and optimization of badger and bbolt.

Key features:

  • Combine the advantages of LSM and B+ tree
  • Fast read/write performance
  • Much lower read and space amplification than typical LSM

Design Overview

Getting Started

package main

import (
	"github.com/lotusdblabs/lotusdb/v2"
)

func main() {
	// specify the options
	options := lotusdb.DefaultOptions
	options.DirPath = "/tmp/lotusdb_basic"

	// open a database
	db, err := lotusdb.Open(options)
	if err != nil {
		panic(err)
	}
	defer func() {
		_ = db.Close()
	}()

	// put a key
	err = db.Put([]byte("name"), []byte("lotusdb"))
	if err != nil {
		panic(err)
	}

	// get a key
	val, err := db.Get([]byte("name"))
	if err != nil {
		panic(err)
	}
	println(string(val))

	// delete a key
	err = db.Delete([]byte("name"))
	if err != nil {
		panic(err)
	}
}

see the examples for more details.

Community

Welcome to join the Slack channel and Discussions to connect with LotusDB team members and other users.

If you are a Chinese user, you are also welcome to join our WeChat group, scan the QR code and you will be invited:

Projets similaires

Fast key-value DB in Go.

Godatabasedocument-databasego
Ddgraph-io
15,8 k étoiles1,3 k

Lightweight, fast and reliable key/value storage engine based on Bitcask.

Godata-structuresdatabaseembedded
Rrosedblabs
4,9 k étoiles643

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

Godata-structuresdatabasego
Nnutsdb
3,6 k étoiles344