bsddb.open additional arguments
Question
The bsddb
module has three ways to open a db-file:
bsddb.hashopen(filename[, flag[, mode[, pgsize[, ffactor[, nelem[, cachesize[, lorder[, hflags]]]]]]]])
bsddb.btopen(filename[, flag[, mode[, btflags[, cachesize[, maxkeypage[, minkeypage[, pgsize[, lorder]]]]]]]])
bsddb.rnopen(filename[, flag[, mode[, rnflags[, cachesize[, pgsize[, lorder[, rlen[, delim[, source[, pad]]]]]]]]]])
The documentation says:
The other arguments (excluding
filename
andflag
) are rarely used and are just passed to the low-level dbopen function. Consult the Berkeley DB documentation for their use and interpretation.
But I haven't found the meaning of those arguments anywhere. Anyone knows the usage of this arguments? I think they may be useful to improve the performance of my db-file, I mean, get
and set
data faster.
Solution
Looking at the C API reference I see some documentation (but indeed it's hard to find). For example, for bsddb.hashopen
:
- mode: DB->open()
- pgsize: DB->set_pagesize(), DB->get_pagesize()
- ffactor: DB->set_h_ffactor(), DB->get_h_ffactor()
- nelem: DB->set_h_nelem(), DB->get_h_nelem()
- cachesize: DB->set_cachesize(), DB->get_cachesize()
- lorder: DB->set_lorder(), DB->get_lorder()
- hflags (not sure about this one, sorry)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow