-I:Berkeley DB Reference Guide: Access Methods[P4

Berkeley DB Reference Guide: Access Methods



C

Specifying your own hashing function (h_hash)



DThe hash function for the hash table can be specified as part of theedb_open call to open the database, specifically by setting theah_hash element of the DB_INFO structure. If no<hash function is specified, a default function will be used.

BSince no hash function performs equally well on all possible data,Hit is possible that applications may find that the default hash function+performs poorly with a particular data set.

EAny application-specified hash function must take a pointer to a byteDstring and a length as arguments and return an unsigned, 32-bit hashvalue.

KAIÿÿ