ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafoappmax.htm

404 lines
30 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Database file sizes" />
<meta name="abstract" content="When designing files on the iSeries server, you should keep in mind the sizes for database files." />
<meta name="description" content="When designing files on the iSeries server, you should keep in mind the sizes for database files." />
<meta name="DC.subject" content="maximum database file sizes, database file, sizes, maximum, summary, database, file maximums, specifying, maximum size of a file, key field, maximum number, length, physical file, maximum size, members and key fields, access path, maximum size" />
<meta name="keywords" content="maximum database file sizes, database file, sizes, maximum, summary, database, file maximums, specifying, maximum size of a file, key field, maximum number, length, physical file, maximum size, members and key fields, access path, maximum size" />
<meta name="DC.Relation" scheme="URI" content="rbafodbfcon.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoappmaxex1.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafoappmax" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Database file sizes</title>
</head>
<body id="rbafoappmax"><a name="rbafoappmax"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Database file sizes</h1>
<div><p>When designing files on the <span class="keyword">iSeries™</span> server,
you should keep in mind the sizes for database files.</p>
<div class="section"><p>The following table lists the maximum values for database files:</p>
</div>
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
<table cellpadding="4" cellspacing="0" summary="" width="100%" border="0"><thead align="left"><tr><th align="left" valign="bottom" width="50%" id="d0e62">Description</th>
<th align="left" valign="bottom" width="50%" id="d0e64">Maximum value</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of bytes in a record</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">32 766 bytes</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of fields in a record format</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">8 000 fields</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of key fields in a file</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">120 fields</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Size of key for physical and logical files</td>
<td align="left" valign="top" width="50%" headers="d0e64 "><span><img src="./delta.gif" alt="Start of change" />32 768 characters<sup>1</sup><img src="./deltaend.gif" alt="End of change" /></span></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Size of key for ORDER BY (SQL) and KEYFLD
(OPNQRYF)</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">10 000 bytes</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of records contained in a file member</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">4 294 967 294 records<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of bytes in a file member</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">1 869 162 846 624 bytes<sup>3</sup></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of bytes in an access path</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">1 099 511 627 776 bytes<sup>3
5</sup></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of keyed logical files built over
a physical file member</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">3686 files</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of physical file members in a logical
file member</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">32 members</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Number of members that can be joined</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">256 members</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Size of a character or DBCS field</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">32 766 bytes<sup>4</sup></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Size of a zoned decimal or packed decimal
field</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">63 digits</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e62 ">Maximum number of distinct database files that can be
in use at one time</td>
<td valign="top" width="50%" headers="d0e64 ">~500 000</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e62 ">Maximum number of members in a physical or logical file</td>
<td valign="top" width="50%" headers="d0e64 ">32 767</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Maximum number of constraints per physical
file</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">300 constraints</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Maximum number of triggers per physical file</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">300 triggers</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e62 ">Maximum number of recursive insert and update
trigger calls</td>
<td align="left" valign="top" width="50%" headers="d0e64 ">200</td>
</tr>
<tr><td colspan="2" align="left" valign="top" headers="d0e62 d0e64 "><p><img src="./delta.gif" alt="Start of change" /><sup>1</sup> When a first-changed-first-out (FCFO) access path
is specified for the file, the maximum value for the size of the key for physical
and logical files is 32 763 for ACCPTHSIZ(*MAX1TB) and 1995 characters
for ACCPTHSIZ(*MAX4GB).<img src="./deltaend.gif" alt="End of change" /></p>
<p><img src="./delta.gif" alt="Start of change" /><sup>2</sup> For files with keyed
sequence access paths, the maximum number of records in a member varies and
can be estimated using the following formulas.<img src="./deltaend.gif" alt="End of change" /></p>
<div class="p"><img src="./delta.gif" alt="Start of change" />When ACCPTHSIZ(*MAX4GB)
is specified, use the following formula:<p><u>2,867,200,000        </u><br />
10 + (.8 x key length)</p>
<img src="./deltaend.gif" alt="End of change" /></div>
<div class="p"><img src="./delta.gif" alt="Start of change" />When ACCPTHSIZ(*MAX1TB)
is specified, use the following formula:<p><u>725,680,000,000    </u><br />
12 + (.8 x key length)</p>
<img src="./deltaend.gif" alt="End of change" /></div>
<p><img src="./delta.gif" alt="Start of change" />These are estimated values.
The actual maximum number of records can vary significantly.<img src="./deltaend.gif" alt="End of change" /></p>
<p><sup>3</sup> Both
the number of bytes in a file member and the number of bytes in an access
path must be looked at when message CPF5272 is sent indicating that the maximum
system object size has been reached.</p>
<p><sup>4</sup> The maximum size of
a variable-length character or DBCS field is 32 740 bytes. DBCS-graphic
field lengths are expressed in terms of characters; therefore, the maximums
are 16 383 characters (fixed length) and 16 370 characters (variable
length).</p>
<p><sup>5</sup> The maximum is 4 294 966 272 bytes
if the access path is created with a maximum size of 4 gigabytes (GB), ACCPTHSIZ(*MAX4GB).</p>
</td>
</tr>
</tbody>
</table>
</td></tr></table>
<div class="section"><p>These are maximum values. There are situations where the actual
limit you experience will be less than the stated maximum. For example, certain
high-level languages can have more restrictive limits than those described
above.</p>
</div>
<div class="section"><p>Keep in mind that performance can suffer as you approach some
of these maximums. For example, the more logical files you have built over
a physical file, the greater the chance that system performance can suffer
(if you are frequently changing data in the physical file that causes a change
in many logical file access paths).</p>
</div>
<div class="section"><p>Normally, an <span class="keyword">iSeries</span> database file can grow until
it reaches the maximum size allowed on the system. The system normally will
not allocate all the file space at once. Rather, the system will occasionally
allocate additional space as the file grows larger. This method of automatic
storage allocation provides the best combination of good performance and effective
auxiliary storage space management.</p>
</div>
<div class="section"><p>If you want to control the size of the file, the storage allocation,
and whether the file should be connected to auxiliary storage, you can use
the SIZE, ALLOCATE, and CONTIG parameters on the Create Physical File (CRTPF)
and the Create Source Physical File (CRTSRCPF) commands.</p>
</div>
<div class="section"><div class="p">You can use the following
formulas to estimate the disk size of your physical and logical files. <ul><li>For a physical file (excluding the access path) that does not contain
null-capable fields: <img src="./delta.gif" alt="Start of change" /><p>Disk size = (number of valid and deleted records + 1) x <br />
            (record length + 1) + 20480 x (number of members) + 8192</p><img src="./deltaend.gif" alt="End of change" />
The
size of the physical file depends on the SIZE and ALLOCATE parameters on the
CRTPF and CRTSRCPF commands. If you specify ALLOCATE(*YES), the initial allocation
and increment size on the SIZE keyword must be used instead of the number
of records.</li>
</ul>
<ul><li>For a physical file (excluding the access path) that contains null-capable
fields: <img src="./delta.gif" alt="Start of change" /><p>Disk size = (number of valid and deleted records + 1) x <br />
                    (record length + 1) + 20480 x (number of members) + <br />
                    8192 + ((number of fields in format ÷ 8) rounded up) x <br />
                    (number of valid and deleted records + 1) </p><img src="./deltaend.gif" alt="End of change" />
The
size of the physical file depends on the SIZE and ALLOCATE parameters on the
CRTPF and CRTSRCPF commands. If you specify ALLOCATE(*YES), the initial allocation
and increment size on the SIZE keyword must be used instead of the number
of records.</li>
<li>For a logical file (excluding the access path): <img src="./delta.gif" alt="Start of change" /><p>Disk size = (12288) x (number of members) + 8192</p><img src="./deltaend.gif" alt="End of change" />
</li>
<li>For a keyed sequence access path the generalized equation for index size,
per member, is: <p> <br />
let a = (LimbPageUtilization - LogicalPageHeaderSize) *<br />
        (LogicalPageHeaderSize - LeafPageUtilization - 2 * NodeSize)<br />
<br />
let b = NumKeys * (TerminalTextPerKey + 2 * NodeSize) *<br />
        (LimbPageUtilization - LogicalPageHeaderSize + 2 * NodeSize)<br />
        + CommonTextPerKey * [ LimbPageUtilization + LeafPageUtilization<br />
        - 2 * (LogicalPageHeaderSize - NodeSize) ]<br />
        - 2 * NodeSize * (LeafPageUtilization - LogicalPageHeaderSize<br />
        + 2 * NodeSize)<br />
<br />
let c = CommonTextPerKey * [ 2 * NodeSize - CommonTextPerKey<br />
        - NumKeys * (TerminalTextPerKey + 2 * NodeSize) ]<br />
<br />
<br />
then NumberLogicalPages = ceil( [ -b - sqrt(b ** 2 - 4 * a * c) ]<br />
                          / (2 * a))<br />
<br />
and TotalIndexSize = NumberLogicalPages * LogicalPageSize<br />
</p>
<div class="p">This equation is used for both three and four byte indexes by
changing the set of constants in the equation as follows:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="90%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" class="firstcol" id="d0e268">Constant</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e270">Three-byte index</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e272">Four-byte index</th>
</tr>
</thead>
<tbody><tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e276" headers="d0e268 ">NodeSize</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e276 d0e270 "><strong>3</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e276 d0e272 "><strong>4</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e285" headers="d0e268 ">LogicalPageHeaderSize</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e285 d0e270 "><strong>16</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e285 d0e272 "><strong>64</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e294" headers="d0e268 ">LimbPageUtilization</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e294 d0e270 "><strong>.75 * LogicalPageSize</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e294 d0e272 "><strong>.75 * LogicalPageSize</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e303" headers="d0e268 ">LeafPageUtilization</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e303 d0e270 "><strong>.75 * LogicalPageSize</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e303 d0e272 "><strong>.80 * LogicalPageSize</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="p">The remaining constants, CommonTextPerKey and TerminalTextPerKey,
are probably best estimated by using the following formulas: <p> <br />
CommonTextPerKey = [ min(max(NumKeys - 256,0),256)<br />
                   + min(max(NumKeys - 256 * 256,0),256 * 256)<br />
                   + min(max(NumKeys - 256 * 256 * 256,0),<br />
                     256 * 256 * 256)<br />
                   + min(max(NumKeys - 256 * 256 * 256 * 256,0),<br />
                     256 * 256 * 256 * 256) ]<br />
                   * (NodeSize + 1) / NumKeys<br />
<br />
TerminalTextPerKey = KeySizeInBytes - CommonTextPerKey<br />
</p>
</div>
<p>This should reduce everything needed to calculate the index
size to the type of index (that is, 3 or 4 byte), the total key size, and
the number of keys. The estimate should be greater than the actual index size
because the common text estimate is minimal.</p>
<div class="p">Given this generalized
equation for index size, the LogicalPageSize is as follows:
<div class="tablenoborder"><a name="rbafoappmax__rbafologpgsz"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rbafoappmax__rbafologpgsz" width="90%" frame="hsides" border="0" rules="none"><caption>Table 1. LogicalPageSize
values</caption><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" class="firstcol" id="d0e328">Key Length</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e330">*MAX4GB (3-byte) LogicalPageSize</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e332">*MAX1TB (4-byte) LogicalPageSize</th>
</tr>
</thead>
<tbody><tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e336" headers="d0e328 ">1 - 500</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e336 d0e330 "><strong>4096 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e336 d0e332 "><strong>8192 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e345" headers="d0e328 ">501 - 1000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e345 d0e330 "><strong>8192 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e345 d0e332 "><strong>16 384 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e354" headers="d0e328 ">1001 - 2000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e354 d0e330 "><strong>16 384 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e354 d0e332 "><strong>32 768 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e363" headers="d0e328 "><img src="./delta.gif" alt="Start of change" />2001 - 10 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e363 d0e330 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e363 d0e332 "><img src="./delta.gif" alt="Start of change" /><strong>65 536 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e372" headers="d0e328 "><img src="./delta.gif" alt="Start of change" />10 001 - 18 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e372 d0e330 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e372 d0e332 "><img src="./delta.gif" alt="Start of change" /><strong>131 072 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e381" headers="d0e328 "><img src="./delta.gif" alt="Start of change" />18 001 - 26 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e381 d0e330 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e381 d0e332 "><img src="./delta.gif" alt="Start of change" /><strong>262 144 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e390" headers="d0e328 "><img src="./delta.gif" alt="Start of change" />26 001 - 32 768<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e390 d0e330 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e390 d0e332 "><img src="./delta.gif" alt="Start of change" /><strong>524 288 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="p">The LogicalPageSizes in <a href="#rbafoappmax__rbafologpgsz">Table 1</a> generate
the following LimbPageUtilizations:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="90%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" class="firstcol" id="d0e410">Key Length</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e412">*MAX4GB (3-byte) LimbPageUtilization</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e414">*MAX1TB (4-byte) LimbPageUtilization</th>
</tr>
</thead>
<tbody><tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e418" headers="d0e410 ">1 - 500</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e418 d0e412 "><strong>3072 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e418 d0e414 "><strong>6144 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e427" headers="d0e410 ">501 - 1000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e427 d0e412 "><strong>6144 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e427 d0e414 "><strong>12 288 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e436" headers="d0e410 ">1001 - 2000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e436 d0e412 "><strong>12 288 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e436 d0e414 "><strong>24 576 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e445" headers="d0e410 "><img src="./delta.gif" alt="Start of change" />2001 - 10 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e445 d0e412 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e445 d0e414 "><img src="./delta.gif" alt="Start of change" /><strong>49 152 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e454" headers="d0e410 "><img src="./delta.gif" alt="Start of change" />10 001 - 18 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e454 d0e412 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e454 d0e414 "><img src="./delta.gif" alt="Start of change" /><strong>98 304 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e463" headers="d0e410 "><img src="./delta.gif" alt="Start of change" />18 001 - 26 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e463 d0e412 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e463 d0e414 "><img src="./delta.gif" alt="Start of change" /><strong>196 608 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e472" headers="d0e410 "><img src="./delta.gif" alt="Start of change" />26 001 - 32 768<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e472 d0e412 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e472 d0e414 "><img src="./delta.gif" alt="Start of change" /><strong>393 216 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="p">The LogicalPageSizes in <a href="#rbafoappmax__rbafologpgsz">Table 1</a> generate
the following LeafPageUtilizations:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="90%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" class="firstcol" id="d0e493">Key Length</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e495">*MAX4GB (3-byte) LeafPageUtilization</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e497">*MAX1TB (4-byte) LeafPageUtilization</th>
</tr>
</thead>
<tbody><tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e501" headers="d0e493 ">1 - 500</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e501 d0e495 "><strong>3072 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e501 d0e497 "><strong>6554 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e510" headers="d0e493 ">501 - 1000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e510 d0e495 "><strong>6144 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e510 d0e497 "><strong>13 107 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e519" headers="d0e493 ">1001 - 2000</th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e519 d0e495 "><strong>12 288 bytes</strong></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e519 d0e497 "><strong>26 214 bytes</strong></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e528" headers="d0e493 "><img src="./delta.gif" alt="Start of change" />2001 - 10 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e528 d0e495 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e528 d0e497 "><img src="./delta.gif" alt="Start of change" /><strong>52 428 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e537" headers="d0e493 "><img src="./delta.gif" alt="Start of change" />10 001 - 18 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e537 d0e495 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e537 d0e497 "><img src="./delta.gif" alt="Start of change" /><strong>104 857 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e546" headers="d0e493 "><img src="./delta.gif" alt="Start of change" />18 001 - 26 000<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e546 d0e495 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e546 d0e497 "><img src="./delta.gif" alt="Start of change" /><strong>209 715 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
<tr><th align="left" valign="top" width="33.33333333333333%" class="firstcol" id="d0e555" headers="d0e493 "><img src="./delta.gif" alt="Start of change" />26 001 - 32 768<img src="./deltaend.gif" alt="End of change" /></th>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e555 d0e495 "><img src="./delta.gif" alt="Start of change" /><strong>N/A</strong><img src="./deltaend.gif" alt="End of change" /></td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e555 d0e497 "><img src="./delta.gif" alt="Start of change" /><strong>419 430 bytes</strong><img src="./deltaend.gif" alt="End of change" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="p">Then to simplify the generalized equation for index size,
let: <p> <br />
CommonTextPerKey = 0<br />
<br />
which would cause:<br />
<br />
TerminalTextPerKey = KeySizeInBytes<br />
<br />
b = NumKeys * (KeySizeInBytes + 2 * NodeSize) *<br />
    (LimbPageUtilization - LogicalPageHeaderSize + 2 * NodeSize)<br />
    - 2 * NodeSize * (LeafPageUtilization - LogicalPageHeaderSize<br />
    + 2 * NodeSize)<br />
<br />
c = 0<br />
<br />
NumberLogicalPages = ceil( [ -b - sqrt(b ** 2 ) ]<br />
                          / (2 * a))<br />
                   = ceil[ (-2 * b) / (2 * a) ]<br />
                   = ceil[ -b/a ]<br />
</p>
</div>
</li>
</ul>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafoappmaxex1.htm">Examples: Database file sizes</a></strong><br />
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodbfcon.htm" title="These topics provide some of the basic database concepts for setting up or working with IBM i5/OS database files.">Database file concepts</a></div>
</div>
</div>
</body>
</html>