boltdb / bolt

An embedded key/value database for Go.
MIT License
14.24k stars 1.51k forks source link

how to use boltdb for multiple files #747

Closed qshuai closed 6 years ago

qshuai commented 6 years ago

If there is a single file to store, it will be so hug. I just want to store my data using many files. How to do this?

igordata commented 6 years ago

Just open as many as you want db1, err1 := bolt.Open("my1.db", 0600, nil) db2, err2 := bolt.Open("my2.db", 0600, nil)

qshuai commented 6 years ago

@igordata Thanks!

Your scheme is feasible, but I do not like the way! I am looking for the scheme better than this.

The following repository written by me is a sample similar to this scheme. bolt-multifile-sample