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

120 lines
6.1 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="Examples: Database file sizes" />
<meta name="DC.Relation" scheme="URI" content="rbafoappmax.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="rbafoappmaxex1" />
<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>Examples: Database file sizes</title>
</head>
<body id="rbafoappmaxex1"><a name="rbafoappmaxex1"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: Database file sizes</h1>
<div><div class="section"><div class="p">A *MAX1TB (4-byte) access path with 120 byte keys and 500 000
records TotalIndexSize has a TotalIndexSize in bytes as follows: <pre>a = (LimbPageUtilization - LogicalPageHeaderSize) *
(LogicalPageHeaderSize - LeafPageUtilization - 2 * NodeSize)
= (6144 - 64) *
(64 - 6554 - 2 * 4)
= 6080 * -6498
= -39,507,840
b = NumKeys * (KeySizeInBytes + 2 * NodeSize) *
(LimbPageUtilization - LogicalPageHeaderSize + 2 * NodeSize)
- 2 * NodeSize * (LeafPageUtilization - LogicalPageHeaderSize
+ 2 * NodeSize)
= 500,000 * (120 + 2 * 4) *
(6144 - 64 + 2 * 4)
- 2 * 4 * (6554 - 64 + 2 * 4)
= 500,000 * 128 *
6088
- 8 * 6498
= 3.896319e+11
NumberLogicalPages = ceil[ -b/a ]
= ceil[ -3.896319e+11/-39507840 ]
= 9863
TotalIndexSize = NumberLogicalPages * LogicalPageSize
= 9863 * 8192
= 80,797,696 bytes</pre>
</div>
</div>
<div class="section"><div class="p">The equation for index size in previous versions of the operating
system produces the following result: <pre>TotalIndexSize = (number of keys) * (key length + 8) *
(0.8) * (1.85) + 4096
= (NumKeys) * (KeySizeInBytes + 8) *
(0.8) * (1.85) + 4096
= 500000 * 128 *
.8 * 1.85 + 4096
= 94,724,096
</pre>
</div>
</div>
<div class="section"><p>This estimate can differ significantly from your file. The keyed
sequence access path depends heavily on the data in your records. The only
way to get an accurate size is to load your data and display the file description.</p>
</div>
<div class="section"><p>The following table shows wa list of minimum file sizes: </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="75%" id="d0e44">Description</th>
<th align="left" valign="bottom" width="25%" id="d0e46">Minimum size</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="75%" headers="d0e44 ">Physical file without a member</td>
<td align="left" valign="top" width="25%" headers="d0e46 ">8192 bytes</td>
</tr>
<tr><td align="left" valign="top" width="75%" headers="d0e44 ">Physical file with a single member</td>
<td align="left" valign="top" width="25%" headers="d0e46 ">20 480 bytes</td>
</tr>
<tr><td align="left" valign="top" width="75%" headers="d0e44 ">Keyed sequence access path</td>
<td align="left" valign="top" width="25%" headers="d0e46 ">12 288 bytes</td>
</tr>
</tbody>
</table>
</td></tr></table>
<div class="section"> <div class="note"><span class="notetitle">Note:</span> Additional space is not required for an arrival sequence access
path.</div>
</div>
<div class="section"><div class="p">In addition to the file sizes, the system maintains internal formats
and directories for database files. (These internal objects are owned by user
profile QDBSHR.) The following are estimates of the sizes of those objects: <ul><li>For any file not sharing another file's format: <img src="./delta.gif" alt="Start of change" /><p>   Format size = (144 x number of fields) + 4096</p><img src="./deltaend.gif" alt="End of change" />
</li>
<li>For files sharing their format with any other file: <img src="./delta.gif" alt="Start of change" /><p>   Format sharing directory size = (16 x number of files<br />
   sharing the format) + 4096</p><img src="./deltaend.gif" alt="End of change" />
</li>
<li>For each physical file and each physical file member having a logical
file or logical file member built over it: <img src="./delta.gif" alt="Start of change" /><p>   Data sharing directory size = (16 x number of files<br />
   or members sharing data) + 4096</p><img src="./deltaend.gif" alt="End of change" />
</li>
<li>For each file member having a logical file member sharing its access path: <img src="./delta.gif" alt="Start of change" /><p>   Access path sharing directory size = (16 x number of files<br />
   or members sharing access path) + 4096</p><img src="./deltaend.gif" alt="End of change" />
</li>
</ul>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoappmax.htm" title="When designing files on the iSeries server, you should keep in mind the sizes for database files.">Database file sizes</a></div>
</div>
</div>
</body>
</html>