[Date Prev][Date Next]
Re: btree vs hash for ldbm backend
søn, 25.01.2004 kl. 20.03 skrev Mark Blackman:
> I just wondered if there was some reason to prefer btree storage
> ldbm backends over hash storage ldbm backends. Naively, I'd have
> thought that hash backends would be quicker for lookups, but perhaps
> there's other issues I'm not considering.
> In my small dataset (~1000 entries), I can't find any difference in
> speed between the two, but I'd guess for large datasets there is a
> noticeable difference.
> Anyway, I'd be grateful for the merest clue why btree appears
> to be preferred.
Wietse Venema's (Postfix) reason for choosing btree over BDB is, that
BDB would get corrupted during writes. However, this is in respect to
BDB 3. Since then, there has been a huge upgrade by Sleepycat (e.g., I'm
now using BDB 4.2.52) which could nullify such a policy.
As far as ldbm is concerned, even Sleepycat has said: "Don't" in its
docs, and vendors such as my own, RedHat, have taken notice and moved
over to BDB 4 (I'm running RH RHEL3). It's definitely worth carefully
studying the .html docs in the latest Sleepycat 4.2.52 tarball release
(which is *not* part of RHEL 3, but which I've nonetheless installed and
use for Openldap).
mail: billy - at - billy.demon.nl