pure golang key database support key have value. 非常高效实用的键值数据库。

orderfile32

pure golang key database support key have value

The orderfile32 is standard alone fast key value database. It have two version. one is this. two is orderfilepeta. this version is open source version. this version support database size is 32gb. max key add value length is 128kb. orderfilepeta database max size support 16peta byte. max key add value length 32mb. orderfile peta for commerce use only. if you want orderfilepeta you can contact me by email [email protected]. normal user orderfile32 is enough for using. 32gb is compressed size. this size can contain about 2billion normal item data.

this projec I devloped many years. now I release it for public. if you like it. you can use it. you will found it is very good.

feature

  1. hight performance
  2. log database.
  3. support application crash recover.
  4. small database file.
  5. embedable
  6. support rand get from database.
  7. support max match for word split.
  8. support find previous/next key by current key.
  9. support zip snappy xz lz4 flate compress type.
  10. support database compress after used long time.
  11. support multi core.
  12. support multi thread.
  13. support automatic recover.
  14. support fix key length.
  15. support unique key defined by end bytes.
  16. support normal application and large data application.
  17. support fill function using key suffix.

install

got get github.com/epowsal/orderfile32

simple example code

package main
import "github.com/epowsal/orderfile32"
db,dber:=NewOrderfile("myfirstdb",0,0,[]byte{0})
if dber!=nil {
  panic(dber)
 }
 db.PushKey([]byte("key"),[]byte("value"))
 fkey,bfkey:=db.FillKey([]byte("key"))
 if bfkey==false {
    panic("error")
 }
 fmt.Println(fkey)
 db.Close()

benchmark compare to other

write benchmark

ordefile32 write 1 million speed test screenshot: orderfile321millionwrite_ok

badger write 1 million speed test screenshot: badger1millinwrite3

bolt write 200 thousand speed test screenshot: boltwrite200thousand2

orderfilepeta write 1 million speed test screenshot: orderfilepeta1millionwrite_ok

orderfile32 write 1 million items use 7.1 second.

badger write 1 million items use 26.7 second.

bolt write 0.2 million items use 90 second.

orderfilepeta write 1 million items use 15.9 second.

so orderfile32 if the fastest writing database.the large database orderfilepeta is faster than badger.

read benchmark

ordefile32 read 1 million times speed test screenshot:

orderfile1millionread_ok

badger read 1 million times speed test screenshot: badger1millinread

bolt read 0.2 million times speed test screenshot: bolt200thousandread

ordefilepeta read 1 million times speed test screenshot: orderfilepeta1millionread_ok

after test get:

orderfile32 read 1 million items first time read use 3.9 second. second time read use 3.0 second.

badger read 1 million items use 6.5 second.

bolt read 0.2 million items use 0.5 second.

orderfilepeta read 1 million items. first read use 6.5 second. second read use 6.1 second.

so if bolt read 1 million items will use 2.5 second.

so bolt is the fastest reading database.

compare orderfile32 with badger. orderfile32 is almost two time faster than badger.

compare orderfilepeta with badger. they almost equal.

database size compare:

orderfile32 1 million item file size screenshot: orderfile32dbfilesize

badger 1 million item file size screenshot: badgrdbfilesize

bolt 0.2 million item file size screenshot: boltdb0 2millionsize

orderfilepeta 1 million item file size scrrenshot: orderfilepetadbfilesize

orderfile32 1 million items database file size is 19mb.

badger 1 million items database file size is 26.7mb.

bolt 0.2 million items database file size is 16mb.

orderfilepeta 1 million items database file size if 20mb.

bolt 5 times size is 80mb.

so bolt have largest database file size.

orderfile32 and orderfilepeta have smallest database file size.

thanks and support me by donate

paypal:

paypal

捐赠以表示感谢与支持

支付宝:

接受捐赠200pixel

Similar Resources

Membin is an in-memory database that can be stored on disk. Data model smiliar to key-value but values store as JSON byte array.

Membin Docs | Contributing | License What is Membin? The Membin database system is in-memory database smiliar to key-value databases, target to effici

Jun 3, 2021

An embedded, hardened key/value database for Go.

Bolt Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable datab

Nov 4, 2021

GalaxyDB is a hobbyist key-value database written in Go.

GalaxyDB GalaxyDB is a hobbyist key-value database written in Go Author: Andrew N ([email protected]) Features Data is stored via keys Operations Grafana

Mar 30, 2022

A lightweight document-oriented NoSQL database written in pure Golang.

A lightweight document-oriented NoSQL database written in pure Golang.

Lightweight document-oriented NoSQL Database 🇬🇧 English | 🇨🇳 简体中文 | 🇪🇸 Spanish CloverDB is a lightweight NoSQL database designed for being simpl

Jan 1, 2023

A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.

go-mysql-server is a SQL engine which parses standard SQL (based on MySQL syntax) and executes queries on data sources of your choice. A simple in-memory database and table implementation are provided, and you can query any data source you want by implementing a few interfaces.

Dec 27, 2022

Pure Go implementation of D. J. Bernstein's cdb constant database library.

Pure Go implementation of D. J. Bernstein's cdb constant database library.

Oct 19, 2022

A rest-api that works with golang as an in-memory key value store

Rest API Service in GOLANG A rest-api that works with golang as an in-memory key value store Usage Run command below in terminal in project directory.

Dec 6, 2021

A simple golang api generator that stores struct fields in key/value based databases

Backgen A simple golang API generator that uses key/value based databases. It does not provide the database itself, only uses a interface to access se

Feb 4, 2022

Fast key-value DB in Go.

Fast key-value DB in Go.

BadgerDB BadgerDB is an embeddable, persistent and fast key-value (KV) database written in pure Go. It is the underlying database for Dgraph, a fast,

Dec 29, 2022
Related tags
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

BuntDB is a low-level, in-memory, key/value store in pure Go. It persists to disk, is ACID compliant, and uses locking for multiple readers and a sing

Dec 30, 2022
Simple key value database that use json files to store the database

KValDB Simple key value database that use json files to store the database, the key and the respective value. This simple database have two gRPC metho

Nov 13, 2021
Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on commands and key-regexes written by GO

Welcome to NIPO Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on command

Dec 28, 2022
Eagle - Eagle is a fast and strongly encrypted key-value store written in pure Golang.

EagleDB EagleDB is a fast and simple key-value store written in Golang. It has been designed for handling an exaggerated read/write workload, which su

Dec 10, 2022
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.

NutsDB English | 简体中文 NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go. It supports fully serializable transacti

Jan 1, 2023
Low-level key/value store in pure Go.
Low-level key/value store in pure Go.

Description Package slowpoke is a simple key/value store written using Go's standard library only. Keys are stored in memory (with persistence), value

Jan 2, 2023
An embedded key/value database for Go.

bbolt bbolt is a fork of Ben Johnson's Bolt key/value store. The purpose of this fork is to provide the Go community with an active maintenance and de

Jan 1, 2023
ACID key-value database.

Coffer Simply ACID* key-value database. At the medium or even low latency it tries to provide greater throughput without losing the ACID properties of

Dec 7, 2022
LevelDB key/value database in Go.

This is an implementation of the LevelDB key/value database in the Go programming language. Installation go get github.com/syndtr/goleveldb/leveldb R

Jan 1, 2023
Graviton Database: ZFS for key-value stores.
Graviton Database: ZFS for key-value stores.

Graviton Database: ZFS for key-value stores. Graviton Database is simple, fast, versioned, authenticated, embeddable key-value store database in pure

Dec 31, 2022