The effect of opening a large number of (sub) databases on performance #216
-
Hi! How correct is it to open thousands (or even tens of thousands and more) of (sub) databases?
Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The maximum number of databases does affect performance, according to the LMDB docs:
http://www.lmdb.tech/doc/group__mdb.html#gaa2fc2f1f37cb1115e733b62cab2fcdbc |
Beta Was this translation helpful? Give feedback.
The maximum number of databases does affect performance, according to the LMDB docs:
http://www.lmdb.tech/doc/group__mdb.html#gaa2fc2f1f37cb1115e733b62cab2fcdbc
(this function is mapped
maxDbs
)However, I think it requires a very large number before there is any noticeable impact (probably tens of thousands). I think this is stored in a 32-bit value, so might be a 4G limit on number, but almost certainly would run into performance issues before then.
Generally each root database is going to be much more expensive…