1<!--$Id: db_set_bt_minkey.so,v 10.38 2004/09/28 15:04:19 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DB-&gt;set_bt_minkey</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DB-&gt;set_bt_minkey</b>
14</td>
15<td align=right>
16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24int
25DB-&gt;set_bt_minkey(DB *db, u_int32_t bt_minkey);
26<p>
27int
28DB-&gt;get_bt_minkey(DB *db, u_int32_t *bt_minkeyp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB-&gt;set_bt_minkey</b>
32<p>Set the minimum number of key/data pairs intended to be stored on any
33single Btree leaf page.</p>
34<p>This value is used to determine if key or data items will be stored on
35overflow pages instead of Btree leaf pages.  For more information on
36the specific algorithm used, see <a href="../ref/am_conf/bt_minkey.html">Minimum keys per page</a>.  The <b>bt_minkey</b> value specified must
37be at least 2; if <b>bt_minkey</b> is not explicitly set, a value of
382 is used.</p>
39<p>The DB-&gt;set_bt_minkey method configures a database, not only operations performed
40using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
41<p>The DB-&gt;set_bt_minkey method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
42If the database already exists when
43<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_bt_minkey will
44be ignored.
45</p>
46<p>The DB-&gt;set_bt_minkey method
47returns a non-zero error value on failure
48and 0 on success.
49</p>
50<b>Parameters</b> <br>
51 <b>bt_minkey</b><ul compact><li>The <b>bt_minkey</b> parameter is the minimum number of key/data pairs
52intended to be stored on any single Btree leaf page.</ul>
53<br>
54<br><b>Errors</b>
55<p>The DB-&gt;set_bt_minkey method
56may fail and return one of the following non-zero errors:</p>
57<br>
58<b>EINVAL</b><ul compact><li>If the method was called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called; or if an
59invalid flag value or parameter was specified.</ul>
60<br>
61<hr size=1 noshade>
62<b>Description: DB-&gt;get_bt_minkey</b>
63<p>The DB-&gt;get_bt_minkey method returns the minimum number of key/data pairs intended to be stored on any single Btree
64leaf page.</p>
65<p>The DB-&gt;get_bt_minkey method may be called at any time during the life of the
66application.</p>
67<p>The DB-&gt;get_bt_minkey method
68returns a non-zero error value on failure
69and 0 on success.
70</p>
71<b>Parameters</b> <br>
72 <b>bt_minkeyp</b><ul compact><li>The DB-&gt;get_bt_minkey method returns  the
73minimum number of key/data pairs intended to be stored on any single Btree
74leaf page in <b>bt_minkeyp</b>.</ul>
75<br>
76<hr size=1 noshade>
77<br><b>Class</b>
78<a href="../api_c/db_class.html">DB</a>
79<br><b>See Also</b>
80<a href="../api_c/db_list.html">Databases and Related Methods</a>
81</tt>
82<table width="100%"><tr><td><br></td><td align=right>
83<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
84</td></tr></table>
85<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
86</body>
87</html>
88