h_nelem.html   [plain text]


<!--$Id: h_nelem.so,v 10.12 2000/03/18 21:43:08 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Hash table size</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></b></td>
<td align=right><a href="../am_conf/h_hash.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/recno.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Hash table size</b></p>
<p>When setting up the hash database, knowing the expected number of elements
that will be stored in the hash table is useful.  This value can be used
by the Hash access method implementation to more accurately construct the
necessary number of buckets that the database will eventually require.</p>
<p>The anticipated number of elements in the hash table can be specified by
calling the <a href="../../api_c/db_set_h_nelem.html">DB-&gt;set_h_nelem</a> method.  If not specified, or set too low,
hash tables will expand gracefully as keys are entered, although a slight
performance degradation may be noticed.  In order for the estimated number
of elements to be a useful value to Berkeley DB, the <a href="../../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a> method
must also be called to set the page fill factor.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../am_conf/h_hash.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/recno.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>