| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Database limits</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="am_misc.html" title="Chapter 4. Access Method Wrapup" /> |
| 11 | <link rel="prev" href="am_misc_stability.html" title="Cursor stability" /> |
| 12 | <link rel="next" href="am_misc_diskspace.html" title="Disk space requirements" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Database limits</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="am_misc_stability.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 4. |
| 26 | Access Method Wrapup |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="am_misc_diskspace.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="am_misc_dbsizes"></a>Database limits</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>The largest database file that Berkeley DB can handle depends on the page size |
| 42 | selected by the application. Berkeley DB stores database file page numbers as |
| 43 | unsigned 32-bit numbers and database file page sizes as unsigned 16-bit |
| 44 | numbers. Using the maximum database page size of 65536, this results in |
| 45 | a maximum database file size of 2<sup>48</sup> (256 terabytes). The |
| 46 | minimum database page size is 512 bytes, which results in a minimum |
| 47 | maximum database size of 2<sup>41</sup> (2 terabytes).</p> |
| 48 | <p>The largest database file Berkeley DB can support is potentially further limited |
| 49 | if the host system does not have filesystem support for files larger than |
| 50 | 2<sup>32</sup>, including the ability to seek to absolute offsets within |
| 51 | those files.</p> |
| 52 | <p>The largest key or data item that Berkeley DB can support is 2<sup>32</sup>, |
| 53 | or more likely limited by available memory. Specifically, while key and |
| 54 | data byte strings may be of essentially unlimited length, any one of |
| 55 | them must fit into available memory so that it can be returned to the |
| 56 | application. As some of the Berkeley DB interfaces return both key and data |
| 57 | items to the application, those interfaces will require that any |
| 58 | key/data pair fit simultaneously into memory. Further, as the access |
| 59 | methods may need to compare key and data items with other key and data |
| 60 | items, it may be a requirement that any two key or two data items fit |
| 61 | into available memory. Finally, when writing applications supporting |
| 62 | transactions, it may be necessary to have an additional copy of any data |
| 63 | item in memory for logging purposes.</p> |
| 64 | <p>The maximum Btree depth is 255.</p> |
| 65 | </div> |
| 66 | <div class="navfooter"> |
| 67 | <hr /> |
| 68 | <table width="100%" summary="Navigation footer"> |
| 69 | <tr> |
| 70 | <td width="40%" align="left"><a accesskey="p" href="am_misc_stability.html">Prev</a> </td> |
| 71 | <td width="20%" align="center"> |
| 72 | <a accesskey="u" href="am_misc.html">Up</a> |
| 73 | </td> |
| 74 | <td width="40%" align="right"> <a accesskey="n" href="am_misc_diskspace.html">Next</a></td> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <td width="40%" align="left" valign="top">Cursor stability </td> |
| 78 | <td width="20%" align="center"> |
| 79 | <a accesskey="h" href="index.html">Home</a> |
| 80 | </td> |
| 81 | <td width="40%" align="right" valign="top"> Disk space requirements</td> |
| 82 | </tr> |
| 83 | </table> |
| 84 | </div> |
| 85 | </body> |
| 86 | </html> |