[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LMDB b-tree question

Kristoffer Sjögren wrote:
Thanks Howard. It wasn't immediately evident in the wording
that MDB_stat use an exclusive b-tree.

Is there some way of estimating the depth of the b-tree based on
database size, number of entries or other metrics?


mdb_stat already reports the depth of the tree.

On Wed, Feb 11, 2015 at 6:38 PM, Howard Chu <hyc@symas.com
<mailto:hyc@symas.com>> wrote:

    Kristoffer Sjögren wrote:


        Does every database consist of a separate b-tree or is
        "database" just a
        name spacing convince? I.e. are reads faster for many smaller
        rather than one large database?

    As the documentation says, named databases are separate b-trees.
    Reads may be slightly faster, sure, but not by much. You need to
    have enough separate DBs to reduce the overall tree height of the
    equivalent combined tree to see a measurable difference.

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/