20.1.2 File sizes required for the execution of the database reorganization utility (pdrorg)

The following table shows the formulas for determining the file sizes required for the execution of the database reorganization utility (pdrorg):

File typeFormula (bytes)
Unload data file1 (no options specified)n
[Figure] (Li + Pi) + 1200 + A + B + c[Figure] 96 + D + I + F
i = 1
Unload data file1 (-w option specified)
DAT or extended DAT format:
c
[Figure] (maximum length of converted character string in column I2 + 1) [Figure] n
i = 1
FIX table in binary format:
c
[Figure] (column data length i3) [Figure] n
i = 1
Non-FIX table in binary format:
{
c
[Figure] (column data length i3 + G) + 4 [Figure] (c + 1)
i = 1
} [Figure] n
Fixed-length character format:
c
[Figure] (maximum length of converted character string for column i4 + crlf) [Figure] n
i = 1
Unload data file1 (-j option specified or during reorganization in units of schemas)5n
[Figure] (Li + Pi) +
i = 1
n
[Figure]{
i = 1
m
[Figure] (Oij + 44)
j = 1
} + 1200 + A + B + c[Figure] 96 + D + I + F
LOB data unload file1n
[Figure]{
i = 1
m
[Figure] (Oij + 44)
j = 1
} + 1200 + A + B + c[Figure] 96 + D + I + F
Index information file
B-tree index:
(K + p) [Figure] n + 512
Plug-in index:
(12 + X) [Figure] n + 1024
These formulas are for the size of one index. If there are multiple indexes, determine the size of each index.
Process results file1700 + number of servers storing table [Figure] 500 + number of tables in schema [Figure] 1000 + total number of storage RDAREAs in schema [Figure] 100
Work file for sorting
Condition 1:
Size of index information file + 4 [Figure] n
Condition 2:
{Size of index information file + 4 [Figure] n} [Figure] 2
  • Condition 1
    When the work buffer size specified in the sort statement [Figure] E
  • Condition 2
    When the work buffer size specified in the sort statement < E
E: Buffer size
The buffer size obtained according to buffer-size-for-sorting for Database Reorganization Utility (pdrorg) in the manual HiRDB Version 8 Command Reference.
A: For key range partitioning: 48 + number of partitioning conditions [Figure] 284
For hash partitioning: 40 + a[Figure] 60
For matrix partitioning (combination of key range partitioning of the boundary value specification and hash partitioning): 48 + (number of partitioning conditions[Figure] 284) + (40 + a[Figure] 60)
B: n[Figure] 36 (for FIX table) or (44 + c[Figure] 4) [Figure] n (for non-FIX table)
D: 16 + (number of LOB columns[Figure] a[Figure] 80)
Add the value of D only if there are LOB columns.
F: Use the following value:
d
[Figure]{(number of abstract-data-type attributes provided by plug-in in column i[Figure] 84) +
i = 1
(number of abstract-data-type LOB attributes provided by plug-in in column i [Figure]a[Figure] 72)}
+ 64 +
d
[Figure] (84 + number of reverse generation functions i[Figure] 60)
i = 1
G: Number of attributes for which the return value of the reverse generation function on column I is BLOB [Figure] 4
I: 136 + number of index partitions [Figure] 60
Add this value when including the index.
K: Index key length
See Table 17-5 List of index key lengths. For variable-length data, keep in mind when defining the maximum length that single columns are also handled as multicolumns.
Li: Actual length of row
Add the data length of each column to obtain the row length. If the data type of a column is BLOB, use 16 as the column length for calculating. If the data type of a column is the abstract data type provided by a plug-in, use 2 as the column length for calculating.
Pi: Data length of the abstract data type provided by a plug-in
Oij: LOB data length
X: Value is as follows
  • For abstract data type
    27 for the abstract data type stored in the LOB RDAREA
    Key length + 2 for the abstract data type of a maximum of 255 bytes of definition length
    2 for the abstract data type of 256 bytes or more of definition length
  • 27 for the SGMLTEXT type
  • 2 for FREEWORD and GEOMETRY types
a: Number of partitioned RDAREAs
c: Number of column definitions
d: Number of columns for which the abstract data type provided by a plug-in is defined
m: Number of LOB columns
n: Number of rows (for a repetition column, number of rows [Figure] number of elements)
p: If all key component columns are fixed length, the value is 10; if they include a variable length, the value is 12.
crlf: Length of linefeed characters added when cr or crlf is specified in the -W option
Determine the length of linefeed characters from the following table:
-W option valueValue to be added
-W dat or -W extdat,cr1
,crlf2
Not specified1
-W fixtext,cr1
,crlf2
Not specified0
Note
When calculating the size of index information files and sort work files, if the index configuration columns are repetition columns, the number of rows to reload and n do not refer to the number of rows but to (number of rows [Figure] number of elements).
1 If the file is larger than 2 GB, take one of the following actions:
2 Table 20-1 lists the maximum lengths of converted character strings for columns in DAT format (-W dat) or extended DAT format (-W extdat).

Table 20-1 Maximum lengths of converted character strings for columns (in DAT or extended DAT format)

Data typeMaximum length of converted character string (bytes)
Numeric dataINTEGER11
SMALLINT11
DECIMAL31
FLOAT23
SMALLFLT23
Character string data1CHARACTERDefined length + 22
VARCHARActual length + 22
Mixed character string data1MCHARDefined length + 22
MVARCHARActual length + 22
National character data1NCHARDefined length + 22
NVARCHARActual length + 22
Date dataDATE10
Time dataTIME8
Date interval dataINTERVAL YEAR TO DAY9
Time interval dataINTERVAL HOUR TO SECOND7
Time stamp dataTIMESTAMP19
If the number of digits for fractions of a second is not 0, add the number of digits for fractions of a second + 1.
Binary data1BINARYActual length + 22
1 If data in extended DAT format contains a double quotation mark ("), the length of the converted character string becomes longer by the number of double quotation marks.
2 Two bytes are added for the enclosing brackets.
If -W dat or -W extdat is specified and sup is specified in the operand, the maximum lengths of converted character strings take effect on the columns as shown below. Note that the actual length indicates the length without the trailing consecutive spaces. For details about the space-compressed output format, see the -W option of the database reorganization utility (pdrorg) in the manual HiRDB Version 8 Command Reference.
Data typeMaximum lengths of converted character string (bytes)
Character string dataCHARACTERActual length + 2
Mixed character string dataMCHARActual length + 2
National character dataNCHARActual length + 2
3 For details about the data length, see the following tables:
4 Table 20-2 shows the maximum lengths of converted character strings for columns of the fixed-length character format (-W fixtext).

Table 20-2 Maximum lengths of converted character strings for columns (fixed-length character format)

Data typeMaximum lengths of converted character string (bytes)
Numeric dataINTEGER11
SMALLINT6
DECIMALNumber of digits + 2
FLOAT23
SMALLFLT23
Character string dataCHARACTER
VARCHAR
Defined lengthIf fixtext_option is specified in the enclose operand, add 2 to the output length.
Mixed character string dataMCHAR
MVARCHAR
Defined length
National character dataNCHAR
NVARCHAR
Defined length [Figure] 2
Date dataDATE10
Time dataTIME8
Date interval dataINTERVAL YEAR TO DAY10
Time interval dataINTERVAL HOUR TO SECOUND8
Time stamp dataTIMESTAMPDecimal part
0:19 2:22 4:24 6:26
Large object dataBLOB0
Binary dataBINARY0
Abstract data typeADT0
5 If you are reorganizing files in units of schemas (including unload files), use the sum of the values obtained for individual tables.