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

DN_SUBTREE indexing

I noticed that back-bdb was calling dn_subtree(NULL, dn) which generates a
list of subtrees all the way up to "". This is a waste; if the backend
suffix contains more than one component then redundant indices will be
generated for each component. E.g., my test database has a suffix
o=foo,c=us. A subtree index is generated both at the o=foo level and the
c=us level, and of course both are identical. The same logic appears to be
in back-ldbm. I just committed a patch to back-bdb to eliminate this
redundancy. I will be committing a similar patch to back-ldbm. Unfortunately
there isn't a convenient mechanism for deleting the unneeded DN index keys
in an existing database or recreating the dn2id database. (Other than
dumping with slapcat, destroying existing files, and reloading with

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support