1<!--$Id: db_set_q_extentsize.so,v 1.23 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_q_extentsize</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_q_extentsize</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_q_extentsize(DB *db, u_int32_t extentsize);
26<p>
27int
28DB-&gt;get_q_extentsize(DB *db, u_int32_t *extentsizep);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB-&gt;set_q_extentsize</b>
32<p>Set the size of the extents used to hold pages in a Queue database,
33specified as a number of pages.  Each extent is created as a separate
34physical file.  If no extent size is set, the default behavior is to
35create only a single underlying database file.</p>
36<p>For information on tuning the extent size, see
37<a href="../ref/am_conf/extentsize.html">Selecting a extent size</a>.</p>
38<p>The DB-&gt;set_q_extentsize method configures a database, not only operations performed
39using the specified <a href="../api_c/db_class.html">DB</a> handle.</p>
40<p>The DB-&gt;set_q_extentsize method may not be called after the <a href="../api_c/db_open.html">DB-&gt;open</a> method is called.
41If the database already exists when
42<a href="../api_c/db_open.html">DB-&gt;open</a> is called, the information specified to DB-&gt;set_q_extentsize will
43be ignored.
44</p>
45<p>The DB-&gt;set_q_extentsize method
46returns a non-zero error value on failure
47and 0 on success.
48</p>
49<b>Parameters</b> <br>
50 <b>extentsize</b><ul compact><li>The <b>extentsize</b> parameter is the number of pages in a Queue database
51extent.</ul>
52<br>
53<br><b>Errors</b>
54<p>The DB-&gt;set_q_extentsize method
55may fail and return one of the following non-zero errors:</p>
56<br>
57<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
58invalid flag value or parameter was specified.</ul>
59<br>
60<hr size=1 noshade>
61<b>Description: DB-&gt;get_q_extentsize</b>
62<p>The DB-&gt;get_q_extentsize method returns the number of pages in an extent.</p>
63<p>The DB-&gt;get_q_extentsize method may be called at any time during the life of the
64application.</p>
65<p>The DB-&gt;get_q_extentsize method
66returns a non-zero error value on failure
67and 0 on success.
68</p>
69<b>Parameters</b> <br>
70 <b>extentsizep</b><ul compact><li>The DB-&gt;get_q_extentsize method returns  the
71number of pages in an extent in <b>extentsizep</b>.</ul>
72<br>
73<hr size=1 noshade>
74<br><b>Class</b>
75<a href="../api_c/db_class.html">DB</a>
76<br><b>See Also</b>
77<a href="../api_c/db_list.html">Databases and Related Methods</a>
78</tt>
79<table width="100%"><tr><td><br></td><td align=right>
80<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>
81</td></tr></table>
82<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
83</body>
84</html>
85