File: am_conf.html

package info (click to toggle)
db4.8 4.8.30-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 112,668 kB
  • ctags: 53,848
  • sloc: ansic: 177,324; java: 66,060; tcl: 61,580; cs: 27,778; cpp: 24,761; sh: 15,649; perl: 14,013; xml: 8,309; makefile: 2,303; awk: 1,749; sql: 390; python: 26; php: 22; asm: 14
file content (328 lines) | stat: -rw-r--r-- 11,741 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Chapter 2.  Access Method Configuration</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
    <link rel="up" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
    <link rel="prev" href="intro_products.html" title="The Berkeley DB products" />
    <link rel="next" href="am_conf_select.html" title="Selecting an access method" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Chapter 2. 
		Access Method Configuration
        </th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="intro_products.html">Prev</a> </td>
          <th width="60%" align="center"> </th>
          <td width="20%" align="right"> <a accesskey="n" href="am_conf_select.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="chapter" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title"><a id="am_conf"></a>Chapter 2. 
		Access Method Configuration
        </h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <p>
          <b>Table of Contents</b>
        </p>
        <dl>
          <dt>
            <span class="sect1">
              <a href="am_conf.html#am_conf_intro">What are the available access methods?</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="am_conf.html#id1588967">Btree</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="am_conf.html#id1587613">Hash</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="am_conf.html#id1588266">Queue</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="am_conf.html#id1589081">Recno</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="am_conf_select.html">Selecting an access method</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="am_conf_select.html#id1589084">Hash or Btree?</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="am_conf_select.html#id1589088">Queue or Recno?</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="am_conf_logrec.html">Logical record numbers</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="general_am_conf.html">General access method configuration</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="general_am_conf.html#am_conf_pagesize">Selecting a page size</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="general_am_conf.html#am_conf_cachesize">Selecting a cache size</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="general_am_conf.html#am_conf_byteorder">Selecting a byte order</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="general_am_conf.html#am_conf_dup">Duplicate data items</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="general_am_conf.html#am_conf_malloc">Non-local memory allocation</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="bt_conf.html">Btree access method specific configuration</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="bt_conf.html#am_conf_bt_compare">Btree comparison</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="bt_conf.html#am_conf_bt_prefix">Btree prefix comparison</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="bt_conf.html#am_conf_bt_minkey">Minimum keys per page</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="bt_conf.html#am_conf_bt_recnum">Retrieving Btree records by logical record number</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="bt_conf.html#am_conf_bt_compress">Compression</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="hash_conf.html">Hash access method specific configuration</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="hash_conf.html#am_conf_h_ffactor">Page fill factor</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="hash_conf.html#am_conf_h_hash">Specifying a database hash</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="hash_conf.html#am_conf_h_nelem">Hash table size</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="rq_conf.html">Queue and Recno access method specific configuration</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="rq_conf.html#am_conf_recno">Managing record-based databases</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="rq_conf.html#am_conf_extentsize">Selecting a Queue extent size</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="rq_conf.html#am_conf_re_source">Flat-text backing files</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="rq_conf.html#am_conf_renumber">Logically renumbering records</a>
                </span>
              </dt>
            </dl>
          </dd>
        </dl>
      </div>
      <div class="sect1" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title" style="clear: both"><a id="am_conf_intro"></a>What are the available access methods?</h2>
            </div>
          </div>
        </div>
        <div class="toc">
          <dl>
            <dt>
              <span class="sect2">
                <a href="am_conf.html#id1588967">Btree</a>
              </span>
            </dt>
            <dt>
              <span class="sect2">
                <a href="am_conf.html#id1587613">Hash</a>
              </span>
            </dt>
            <dt>
              <span class="sect2">
                <a href="am_conf.html#id1588266">Queue</a>
              </span>
            </dt>
            <dt>
              <span class="sect2">
                <a href="am_conf.html#id1589081">Recno</a>
              </span>
            </dt>
          </dl>
        </div>
        <p>Berkeley DB currently offers four access methods: Btree, Hash, Queue and Recno.</p>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1588967"></a>Btree</h3>
              </div>
            </div>
          </div>
          <p>The Btree access method is an implementation of a sorted, balanced tree
structure.  Searches, insertions, and deletions in the tree all take O(log
base_b N) time, where base_b is the average number of keys per page, and
N is the total number of keys stored.  Often, inserting ordered data into
Btree implementations results in pages that are only half-full.  Berkeley DB
makes ordered (or inverse ordered) insertion the best case, resulting in
nearly full-page space utilization.</p>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1587613"></a>Hash</h3>
              </div>
            </div>
          </div>
          <p>The Hash access method data structure is an implementation of Extended
Linear Hashing, as described in "Linear Hashing: A New Tool for File and
Table Addressing", Witold Litwin, <span class="emphasis"><em>Proceedings of the 6th
International Conference on Very Large Databases (VLDB)</em></span>, 1980.</p>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1588266"></a>Queue</h3>
              </div>
            </div>
          </div>
          <p>The Queue access method stores fixed-length records with logical record
numbers as keys.  It is designed for fast inserts at the tail and has a
special cursor consume operation that deletes and returns a record from
the head of the queue.  The Queue access method uses record level locking.</p>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1589081"></a>Recno</h3>
              </div>
            </div>
          </div>
          <p>The Recno access method stores both fixed and variable-length records with
logical record numbers as keys, optionally backed by a flat text (byte
stream) file.</p>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="intro_products.html">Prev</a> </td>
          <td width="20%" align="center"> </td>
          <td width="40%" align="right"> <a accesskey="n" href="am_conf_select.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">The Berkeley DB products </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Selecting an access method</td>
        </tr>
      </table>
    </div>
  </body>
</html>