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

Re: btree vs hash for ldbm backend

On 25 Jan 2004, at 20:56, Howard Chu wrote:

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of 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.


Thanks. That was something I think I read ages ago and came to the conclusion that for unknown datasets and unknown applications, hash was preferred as there was not a huge difference between best and worst case, where btree performance is very sensitive to lookup order.

Anyway, thanks for reminding me of the good discussion there.

I believe that for my apps and datasets, hash is to be preferred.

Exonetric       "The affordable, flexible Internet hosting provider"
http://www.exonetric.com      Telehouse London colo. 40UKP+VAT/month