h_ffactor.html   [plain text]


<!--$Id: h_ffactor.so,v 10.12 2001/04/18 13:44:53 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Page fill factor</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/bt_recnum.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/h_hash.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Page fill factor</b></p>
<p>The density, or page fill factor, is an approximation of the number of
keys allowed to accumulate in any one bucket, determining when the hash
table grows or shrinks.  If you know the average sizes of the keys and
data in your data set, setting the fill factor can enhance performance.
A reasonable rule to use to compute fill factor is:</p>
<blockquote><pre>(pagesize - 32) / (average_key_size + average_data_size + 8)</pre></blockquote>
<p>The desired density within the hash table can be specified by calling
the <a href="../../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a> method.  If no density is specified, one will
be selected dynamically as pages are filled.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../am_conf/bt_recnum.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/h_hash.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>