OpenTP1 Version 7 Operation

[Contents][Index][Back][Next]

Appendix H.7 Estimating the size of a TAM file

This section describes the formula for estimating the size of a TAM file.

A TAM file contains a data section for records, a management section, and an index section. Therefore, when you calculate the size of a TAM file, you need to consider the sizes of the management section and the index section as well. Note that the size also differs depending on the index type used (tree format or hash format).

The formula for determining the size of a TAM file is as follows:

Management section size + index section size + data section size

Legend:
Management section size
Sector length of the OpenTP1 file system
Index section size (for tree format)
[Figure] s (([Figure] w (152 + key length) [Figure] w) x maximum number of records) [Figure] s
Index section size (for hash format)
[Figure] s (([Figure] w (152 + key length) [Figure] w) x (M + N)) [Figure] s
Data section size (for tree format)
[Figure] s ((record length# + 5) x maximum number of records) [Figure] s
Data section size (for hash format)
[Figure] s ((record length# + 5) x (M + N))[Figure] s
M
Result of multiplying the maximum number of records by the hash entry usage rate and truncating the value to a whole number (when the result is less than 1, 1 is assumed)
N
Maximum number of records - 1
S
Sector length of the OpenTP1 file system
[Figure] s [Figure] s
Value rounded up to an integral multiple of the sector length of the OpenTP1 file system
[Figure] w [Figure] w
For 32 bits: Value rounded up to a multiple of 4
For 64 bits: Value rounded up to a multiple of 8
#
Unit of record length: bytes