[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Sleepycat and hash functions
At 11:56 AM 12/14/2002, Hallvard B Furuseth wrote:
>http://www.openldap.org/faq/index.cgi?file=756 says one can use BDB's
>db_dump utility for on-line backups while slapd is running.
>However, db_dump's manpage says:
>
> Dumping and reloading Hash databases that use user-defined hash
> functions will result in new databases that use the default hash
> function. Although using the default hash function may not be optimal
> for the new database, it will continue to work correctly.
>
>Have anyone noticed whether or not such backed-up databases are slower
>than "original" databases? Since slapd precalculates hashes and uses a
>no-op hash function in back-bdb/dbcache.c, I suppose that means all data
>are hashed twice - once by slapd and once by Sleepycat.
>
>The manpage continues:
>
> Dumping and reloading Btree databases that use user-defined prefix or
> comparison functions will result in new databases that use the default
> prefix and comparison functions. In this case, it is quite likely
> that the database will be damaged beyond repair permitting neither
> record storage or retrieval.
>
>Since db_dump is recommended, I take it back-bdb does not use Btree
>databases?
It does... but not with a user-defined comparison function.
User-defined comparison function is only defined for index
databases (which use DB_HASH). So, if they are slower, one
can always recreate them using slapindex(8).
Kurt