Hitachi

Hitachi Advanced Database Setup and Operation Guide


6.3.6 Determining the memory requirement for executing the adbimport command

When executing the adbimport command, the HADB server uses the types of memory listed below. Determine the requirement for each type of memory.

■ Shared memory
  • Process common memory (PROC_IMPORTSZ)

  • Real thread private memory (RTHD_IMPORTSZ)

■ Process memory
  • Heap memory (HEAP_IMPORTSZ)

The following subsections describe the formulas for determining the required amounts of these types of memory.

Organization of this subsection

(1) Determining the process common memory requirement (for executing the adbimport command)

Use the following formula to determine the process common memory (PROC_IMPORTSZ) required for executing the adbimport command.

Formula (kilobytes)

[Figure]

Explanation of variables
#1

Add this value when importing data into a table for which a B-tree index will be defined.

#2

Add this value when importing data into a table for which a range index will be defined.

#3

Add this value when the number of input data files specified in the input data path file name exceeds 1,024.

#4

If you execute multiple adbimport commands concurrently, determine the memory requirement for each adbimport command. Then, add up the total memory requirements.

(a) Determining the variable PROC_IMPT

The variable PROC_IMPT is used to determine the amount of process common memory to be used when importing data. Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

#1

Add this value when the audit trail facility is enabled.

#2

Add this value when importing data into a column store table.

Explanation of variables

DIC: Memory for acquiring the definition information of the table to be imported

Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

#1

Add this value if cost information has been collected in the table.

For details about how to check whether cost information has been collected in the table, see (1) Determining the names of all base tables from which cost information was collected and the collection dates and times in C.9 Searching system tables.

#2

Add this value when the target table is an archivable multi-chunk table.

col_num

Number of columns in the table to be imported

max_rowsz

Maximum row length (bytes)

Determine the maximum row length based on the formula for the row length ROWSZ in (1) Determining the number of pages for base rows (variable BP(i)) under 5.8.2 Determining the number of pages for storing each type of row.

idx_num

Number of indexes defined for the table to be imported

IOA: Memory for creating the data image to be stored in the table

Use the following formula to determine its value.

Formula (kilobytes)
IOA =
  ↑(max_rowsz + 436 + 448 × col_num + 124 × idx_num + 4 × dba_num)
    ÷ 1,024↑ × load_rthd
LOD: Memory required for storing data

Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

#1

Add this value if you specify a compressed (GZIP-format) file as the input data file.

#2

Add if you specify a column structure information file.

read_size

Value specified for the import option adb_import_read_size

read_buff_num

Substitute 3.

decomp_buff_size

Value specified for the import option adb_import_decompress_buff_size

load_rthd

Use the following formula to calculate the value:

value-specified-for-import-option-adb_import_rthd_num - 1
input_file_num

Substitute 1,024.

input_edit_area

Length of the input data editing area

Use the following formula to determine its value.

Formula

[Figure]

input_recsize

input record length

  • Fixed-length data format

    Substitute the value specified for the import option adb_import_input_record_size.

  • CSV format

    Use the following formula to determine its value.

    Formula

    [Figure]

number-of-field-data-items

Obtain the data field data number of each column specified in the column structure information file or the default value if the specification was omitted. Assign the largest of all such values.

Σ(DATASIZE)

Sum of the largest data lengths (in character format) for the data types of all columns in the processing-target table

Determine the largest data length of each data type in character format from the following table.

Table 6‒11: Largest data length in character format for each data type

No.

Classification

Data type

Largest data length in character format

1

Numeric data

INTEGER

23

2

SMALLINT

13

3

DECIMAL(m,n)

m + 5

4

DOUBLE PRECISION

511

5

Character string data

CHAR(n)

n × 2 + 2

6

VARCHAR(n)

n × 2 + 2

7

Datetime data

DATE

12

8

TIME(p)

8 + p + 3

9

TIMESTAMP(p)

19 + p + 3

10

Binary data

BINARY(n)

n × 8 + 2

11

VARBINARY(n)

n × 8 + 2

Legend:

m, n, p: See the topic List of data types in the manual HADB SQL Reference.

IMPORTBUF_CTL: Memory used for controlling the buffer for importing data and creating indexes

Substitute the following value.

Value (kilobytes)
IMPORTBUF_CTL = ↑(248 + BUFBLK) ÷ 1,024↑ × load_rthd
STS: Memory used for saving status information

Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

idx_num

Number of indexes defined for the table to be imported

b_tree_idx_num

Number of B-tree indexes defined for the table to be imported

range_idx_num

Number of range indexes defined for the table to be imported

load_rthd

Use the following formula to calculate the value:

value-specified-for-import-option-adb_import_rthd_num - 1
text_idx_num

Number of text indexes defined for the table to be imported

PAGEALLOC: Information for controlling the allocation of pages for importing data

Use the following formula to determine its value.

Formula (kilobytes)
PAGEALLOC = import_rthd × 310
  • import_rthd

    Use the following formula to calculate the value:

    value-specified-for-import-option-adb_import_rthd_num - 1
PROC_AUDINFSZ

Determine the value of the variable PROC_AUDINFSZ according to (r) Determining the variable AUDINF under (3) Determining the process common memory requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

PROC_IMPT_COLUMN: Memory used to import data into a column store table

Use the following formula to calculate the value:

Formula (kilobytes)

PROC_IMPT_COLUMN =
           ↑((16,128 + 8 × col_num) × rthd_num
           + 512 × (infile_num + workfile_num)) ÷ 1,024↑
col_num

Number of columns in the table to be imported

rthd_num

Use the following formula to determine this value.

value-specified-for-import-option-adb_import_rthd_num - 1
infile_num

Number of input data files

workfile_num

Number of storage directories for temporary work files

(b) Determining the variable PROC_IDX

The variable PROC_IDX is used to determine the amount of process common memory to be used when creating indexes. Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

Explanation of variables

idxf_buff_size

Substitute 1,024.

KEYSZ

Key length of the B-tree index (bytes)

Determine the key length of the index based on 5.8.4 Determining the key length (KEYSZ) of a B-tree index. For variable-length data, use the actual data length. If multiple B-tree indexes have been defined for the processing-target table, use the largest key length of all B-tree indexes.

idx_num

Number of B-tree indexes defined for the table to be processed

load_rthd

Use the following formula to calculate the value:

value-specified-for-import-option-adb_import_rthd_num - 1
cmd_d_opt

The value of the variable cmd_d_opt differs depending on whether an option is specified for the adbimport command, and on the status of the table to be imported. Determine the value of the variable cmd_d_opt according to the following table.

No.

Whether an option is specified for the adbimport command, and the status of the table to be imported

cmd_d_opt value

1

  • When the adbimport command is executed with the -d option specified, but not the -b option

  • When the adbimport command is executed without the -d or -b option specified on an import-target table for which row storage segments are not allocated

  • When the adbimport command is executed with the -b option specified, but not the -d option, for a multi-chunk table

1

2

When the adbimport command is executed without the -d or -b option specified on an import-target table for which row storage segments are allocated

3

rd_buff_size

Value specified for the import option adb_import_dividx_rd_buff_size

ld_buff_size

Value specified for the import option adb_import_dividx_wt_buff_size

CTRL
  • When the indexed columns are fixed-length columns

    Substitute 10 bytes.

  • When the indexed columns include variable-length columns

    Substitute 12 bytes.

text_idx_num

Number of text indexes defined for the table to be imported

dividx_rthd

Use the following formula to determine the value.

value-specified-for-import-option-adb_import_rthd_num - 1

(c) Determining the variable PROC_IDXBUILD

The variable PROC_IDXBUILD is used to determine the amount of process common memory to be used when creating B-tree indexes.

The variable PROC_IDXBUILD takes one of the values described in the following, depending on whether the -d and -b options of the adbimport command are specified and on the status of the import-target table.

PROC_IDXBUILD value (kilobytes)
PROC_IDXBUILD = PROC_IDXCREATE or PROC_IDXCREATE + PROC_IDXMAINT
■ Cases in which PROC_IDXCREATE is used as the value of PROC_IDXBUILD

PROC_IDXCREATE is used in any of the following cases:

  • The adbimport command is executed with the -d option specified and the -b option not specified.

  • When the adbimport command is executed without the -d or -b option specified on an import-target table for which row storage segments are not allocated

  • When the adbimport command is executed with the -b option specified, but not the -d option, for a multi-chunk table

■ Cases in which PROC_IDXCREATE + PROC_IDXMAINT is used as the value of PROC_IDXBUILD

PROC_IDXCREATE + PROC_IDXMAINT is used as the value of PROC_IDXBUILD in the following case:

  • When the adbimport command is executed without the -d or -b option specified on an import-target table for which row storage segments are allocated

Use the following formulas to determine the values of PROC_IDXCREATE and PROC_IDXMAINT.

Explanation of variables

PROC_IDXCREATE: Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

idx_num

Number of B-tree indexes defined for the table to be imported

PROC_IDXCREATE_MEM(k)

Use the following formula to determine its value.

Formula (kilobytes)

PROC_IDXCREATE_MEM(k) =
  ↑(456 + 256 × idx_col_num + (24 + 144 × ↑idx_lv ÷ 16↑)
   × (dividx_rthd + 1) + (KEYSZ + (idx_col_num + 1) × 2 + 12)
   × 2 + page_size × 2 + 268) ÷ 1,024↑
idx_col_num

Number of B-tree indexed columns

idx_lv: Number of levels in the B-tree index

Calculate the recursion formula Formula 1 (for determining PIDX(k)) in (2) Determining the number of storage pages used in the upper page segment (variable IP_UPPER(i)) under 5.8.3 Determining the number of storage pages for each B-tree index segment and substitute the value of n when PIDX(n) results in 1.

Note that in the case of PIDX(1) = 1, the number of levels in the B-tree index is 2.

dividx_rthd

Use the following formula to determine the value.

value-specified-for-import-option-adb_import_rthd_num - 1
KEYSZ: Key length of a B-tree index (bytes)

Determine the key length of the index based on 5.8.4 Determining the key length (KEYSZ) of a B-tree index. For variable-length data, use the actual data length.

page_size

Page size of the data DB area in which the B-tree index is defined (bytes)

Determine this value based on the explanation of the page size of the data DB area in Table 6‒3: DB area page size under (2) Determining the global buffer page requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

PROC_IDXMAINT: Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

idx_num

Number of B-tree indexes defined for the table to be imported

PROC_IDXMAINT_MEM(k)

Use the following formula to determine this value.

Formula (kilobytes)

PROC_IDXMAINT_MEM(k) =
   ↑(16 + (8 + KEYSZ + idx_col_num + 1) × (dividx_rthd - 1)
    + 528 + 144 × idx_col_num
    + ↑(KEYSZ + (idx_col_num + 1) × 2 + 12) ÷ 8↑ × 8
    + (176 + 48 × (idx_lv - 1) + 32 × (idx_lv + 1)
    + page_size × 2
    + ↑(KEYSZ + (idx_col_num + 1) × 2 + 3,068) ÷ 8↑ × 8
    + ↑(KEYSZ + (idx_col_num + 1) × 2 + 4) ÷ 8↑× 16
    + ↑(KEYSZ + (idx_col_num + 1) × 2 + 12) ÷ 8↑ × 8)
    × dividx_rthd) ÷ 1,024↑
KEYSZ: Key length of a B-tree index (bytes)

Determine the key length of the index based on 5.8.4 Determining the key length (KEYSZ) of a B-tree index. For variable-length data, use the actual data length.

idx_col_num

Number of B-tree indexed columns

dividx_rthd

Use the following formula to determine the value.

value-specified-for-import-option-adb_import_rthd_num - 1
idx_lv: Number of levels in the B-tree index

Calculate the recursion formula Formula 1 (for determining PIDX(k)) in (2) Determining the number of storage pages used in the upper page segment (variable IP_UPPER(i)) under 5.8.3 Determining the number of storage pages for each B-tree index segment and substitute the value of n when PIDX(n) results in 1.

Note that in the case of PIDX(1) = 1, the number of levels in the B-tree index is 2.

page_size

Page size of the data DB area in which the B-tree index is defined (bytes)

Determine this value based on the explanation of the page size of the data DB area in Table 6‒3: DB area page size under (2) Determining the global buffer page requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

(d) Determining the variable PROC_RNGIDX

The variable PROC_RNGIDX is used to determine the amount of process common memory to be used when creating range indexes. Use the following formula to determine its value.

Formula (kilobytes)

PROC_RNGIDX = ↑64 × rngidx_num ÷ 1,024↑

Explanation of variable

rngidx_num: Number of range indexes defined for the table to be imported

(e) Determining the variable PROC_INFILE

You need to add the variable PROC_INFILE when the number of input data files specified in the input data path file name exceeds 1,024. Use the following formula to determine its value.

Formula (kilobytes)

PROC_INFILE = ↑((16 + 511) × (INFMAX - 1,024)) ÷ 1,024↑

Explanation of variable

INFMAX: Number of input data files specified in the input data path file name

(f) Determining the variable PROC_DBUPDINF

Use the following formula to determine the value of variable PROC_DBUPDINF.

Formula (kilobytes)

[Figure]

Explanation of variable

DBUPDINF_ENT_NUM

Number of entries in the DB area, table, index, and chunk update information

Determine this value from the formula described below. Note that the formula to be used differs depending on whether the multi-node function is used.

Formula to be used when the multi-node function is not used (count)

[Figure]

Formula to be used when the multi-node function is used (count)

[Figure]

idx_num

Number of B-tree indexes defined for the table to be processed

rngidx_num

Number of range indexes defined for the table to be processed

txtidx_num

Number of text indexes defined for the table to be processed

(g) Determining the variable PROC_RTHDUPDINF

Use the following formula to determine the value of variable PROC_RTHDUPDINF.

Formula (kilobytes)

[Figure]

Explanation of variable

rthd_num

Number of processing real threads

Use the following formula to determine its value.

value-specified-for-import-option-adb_import_rthd_num - 1

(2) Determining the real thread private memory requirement (for executing the adbimport command)

Use the following formula to determine the real thread private memory (RTHD_IMPORTSZ) required for executing the adbimport command.

Formula (kilobytes)

[Figure]

Explanation of variables
#1

Add this value when importing data into a table for which a B-tree index is defined.

#2

Add this value when importing data into a table for which a range index is defined.

#3

Add this value when importing data into a table for which a text index is defined.

(a) Determining the variable IMPORTBUF

The variable IMPORTBUF is used to determine the amount of real thread private memory to be used when importing data and when creating indexes. Use the following formula to determine its value.

Formula (kilobytes)

IMPORTBUF =
     ↑(IMP_SQBLK + IMP_SQIO + IMP_SQPGE + IMP_SQHS) ÷ 1,024↑

Explanation of variables

IMP_SQBLK: Use the following formula to determine its value.

Formula (bytes)

IMP_SQBLK =
   imp_blknum × (112 + ↑IMP_BLKSZ ÷ imp_pagesize ÷ 64↑ × 24)
imp_blknum:

Value specified for the import option adb_import_buff_blk_num

IMP_BLKSZ: Use the following formula to determine the value:
IMP_BLKSZ = 4,096 × 1,024
imp_pagesize:

The smallest of the page sizes of the following DB areas (bytes):

  • DB area storing the processing-target table

  • DB area storing the B-tree index or text index that is defined for the processing-target table

Determine this value based on the explanation of the page size of the data DB area in Table 6‒3: DB area page size under (2) Determining the global buffer page requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

IMP_SQIO: Use the following formula to determine its value.

Formula (bytes)

IMP_SQIO = 568 × imp_blknum
imp_blknum:

Value specified for the import option adb_import_buff_blk_num

IMP_SQPGE: Use the following formula to determine its value.

Formula (bytes)

IMP_SQPGE =
   (176 + imp_pagesize + BUFLOG) × (IMP_BLKSZ ÷ imp_pagesize)
     × imp_blknum
imp_pagesize:

The smallest of the page sizes of the following DB areas (bytes):

  • DB area storing the processing-target table

  • DB area storing the B-tree index or text index that is defined for the processing-target table

Determine this value based on the explanation of the page size of the data DB area in Table 6‒3: DB area page size under (2) Determining the global buffer page requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

BUFLOG:

For details, see the description of the variable BUFLOG in (d) Determining the variable BUFGLOBAL under (3) Determining the process common memory requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

IMP_BLKSZ: Use the following formula to determine its value:
IMP_BLKSZ = 4,096 × 1,024
imp_blknum:

Value specified for the import option adb_import_buff_blk_num

IMP_SQHS: Use the following formula to determine its value.

Formula (bytes)

IMP_SQHS = (8 × imp_blknum) + (40 × imp_blknum)
imp_blknum:

Value specified for the import option adb_import_buff_blk_num

(b) Determining the variable SORTIOBUF

The variable SORTIOBUF is used to determine the amount of real thread private memory to be used for sort processing. Use the following formula to determine its value.

Formula (kilobytes)
SORTIOBUF = sort_io_buff_size

Explanation of variables

sort_io_buff_size

Substitute 2,048.

(c) Determining the variable SORTBUF

The variable SORTBUF is used to determine the amount of real thread private memory to be used for creating indexes during sort processing. Use the following formula to determine its value.

Formula (kilobytes)
SORTBUF = 48 + sort_buff_size × 1,024

Explanation of variables

sort_buff_size

Value specified for the import option adb_import_sort_buff_size#

#

A work file is created during sort processing. The formula for the variable sort_buff_size, which minimizes the size of this file, is shown below. Allocate at least the amount of space indicated by the formula. However, if you are running out of memory or if most data items are already arranged in index key order, do not specify more space than is necessary.

Formula

[Figure]

Explanation of variables

REC_SIZE: Use the following formula to determine its value.

Formula

REC_SIZE = (KEYSZ + SYS1) + SYS2
KEYSZ: Key length of a B-tree index (bytes)

Determine the key length of the index based on 5.8.4 Determining the key length (KEYSZ) of a B-tree index. For variable-length data, use the actual data length. If multiple B-tree indexes have been defined for the processing-target table, use the largest key length among all the B-tree indexes.

SYS1: Assume one of the following values:
  • If the indexed columns of the indexes defined for the table to be imported are fixed-length: 10

  • If any of the indexed columns of the indexes defined for the table to be imported are variable-length: 12

SYS2: Assume one of the following values:
  • If any of the indexes defined for the table to be imported are multiple-column indexes: (number of indexed columns × 4)

  • For all other indexes: 0

BLK: Use the following formula to determine its value.

Formula

BLK = REC_SIZE + (KEYSZ + 8) + 56
row_num

Number of rows to be stored in the table by the adbimport command

KEY_INF: Use the following formula to determine its value.

Formula

KEY_INF = REC_SIZE + (KEYSZ + 8) + 28
COL_INFO: Use the following formula to determine its value.

Formula

COL_INFO = 2,112 + (MULTI_KEY_INFO × 32) + (KEYSZ + 8)
MULTI_KEY_INFO: Assume one of the following values:
  • If any of the B-tree indexes defined for the table to be imported are variable-length multiple-column indexes: (number of indexed columns × 2) + 2

  • In all other cases: 5

(d) Determining the variable RTHD_DATALOAD

The variable RTHD_DATALOAD is used to determine the amount of real thread private memory to be used for importing data. Use the following formula to determine its value.

The formula differs depending on whether the table to be imported is a row store table or a column store table.

■ For a row store table
Formula (kilobytes)

[Figure]

#1

Add this value when a range index is defined for the table that is to be imported.

#2

Add this value when the table to be imported is not a FIX table.

#3

Add this value when executing the adbimport command with the -d option specified for an archivable multi-chunk table.

Explanation of variables
col_num

Number of columns in the table to be imported

var_col_num

Number of VARCHAR and VARBINARY columns in the table to be imported

■ For a column store table
Formula (kilobytes)

[Figure]

#

Add this value when a range index is defined for the table that is to be imported.

Explanation of variables
page_size

Page size of the DB area that stores the table to be imported (bytes)

See Table 6‒3: DB area page size in (2) Determining the global buffer page requirement (for starting the HADB server) under 6.3.3 Determining the memory requirement for starting the HADB server.

col_num

Number of columns in the table to be imported

SEGSIZE

Segment size in the DB area in which DB area files are defined

Use the following formula to determine the value:

Formula (pages)

SEGSIZE = 4,194,304 ÷ page_size
IMP_COLUMN

Work area for importing data into a column store table

Use the following formula to determine the value:

Formula (kilobytes)

IMP_COLUMN =
   16,384 + 1,024 × col_num + ↑((1,736 + 16 × col_num) × col_num
   + input_recsize + 8 × col_num + MAX(input_recsize ,  2,097,152) + IMP_ERRDATA#)
   ÷ 1,024↑

#

Add this value when the adb_import_errdata_file_name import option is specified and the data to be imported is in CSV format.

col_num

Number of columns in the table to be imported

input_recsize

Input record length

For details, see the description of the variable LOD in (a) Determining the variable PROC_IMPT under (1) Determining the process common memory requirement (for executing the adbimport command).

IMP_ERRDATA

Error record output buffer

Use the following formula to determine the value:

Formula (bytes)

IMP_ERRDATA = input_recsize × 1.2
input_recsize

Input record length

For details, see the description of the variable LOD in (a) Determining the variable PROC_IMPT under (1) Determining the process common memory requirement (for executing the adbimport command).

RTHD_DATACOMPRESS

Work area for data compression

Use the following formula to determine the value:

Formula (kilobytes)

[Figure]

col_num_in_table

Number of columns in the table to be imported (tables)

col_compress_work_size(i)

Work area required to compress each column (bytes)

When defining the table to be imported in the CREATE TABLE statement, the value to be substituted differs depending on the column-data compression type of each column. Substitute the value in the following table that corresponds to the column-data compression type. For details about specifying the column-data compression type, see CREATE TABLE (define a table) in Definition SQL in the manual HADB SQL Reference.

Table 6‒12: Work area required to compress each column (value to substitute for col_compress_work_size variable)

No.

Column-data compression type

Work area required to compress each column (value to substitute for col_compress_work_size variable) (bytes)

1

NONE

65,552

2

RUNLENGTH

65,552

3

DICTIONARY

23,270,960

4

DELTA

65,552

5

DELTA_RUNLENGTH

65,552

6

AUTO

23,270,960

(e) Determining the variable RTHD_IDXREC

The variable RTHD_IDXREC is used to determine the amount of real thread private memory to be used when creating B-tree indexes. Use the following formula to determine its value.

Formula (kilobytes)

RTHD_IDXREC =

↑(386 + 328 × (idx_num - 1) + 32 × max_idx_col_num

+ (64 + buf_size × 1,024) × 2 × idx_num) ÷ 1,024↑

Explanation of variables
  • idx_num

    Number of B-tree indexes defined for the table that is to be imported

  • max_idx_col_num

    Maximum number of indexed columns in the B-tree index defined for the table that is to be imported

  • buf_size

    Substitute 1,024.

(f) Determining the variable RTHD_IDXBUILD

The variable RTHD_IDXBUILD is used to determine the amount of real thread private memory to be used when creating B-tree indexes. Use the following formula to determine the value of variable RTHD_IDXBUILD.

Formula (kilobytes)

[Figure]

Explanation of variables
idx_num

Number of B-tree indexes defined for the table that is to be imported

RTHD_IDXBUILD_MEM(k)

Use the following formula to determine its value.

Formula (kilobytes)

RTHD_IDXBUILD_MEM (k) =
   ↑(61,474 + ↑MAX (255,KEYSZ) ÷ 2↑ × 2 + 3,070
   + ↑KEYSZ + CTRL ÷ 8↑ × 8 + MAX (255,KEYSZ)
   + 14 + ↓8 + page_size × 95 ÷ 100↓ × 2) ÷ 1,024↑
page_size

Page size of the data DB area in which the B-tree index is defined (bytes)

Determine this value based on the explanation of the page size of the data DB area in Table 6‒3: DB area page size under (2) Determining the global buffer page requirement (for starting the HADB server) in 6.3.3 Determining the memory requirement for starting the HADB server.

KEYSZ

Key length of the B-tree index (bytes)

Determine the key length of the index based on 5.8.4 Determining the key length (KEYSZ) of a B-tree index. For variable-length data, use the actual data length.

CTRL
  • When all key lengths in the indexed columns are fixed

    Substitute 10 bytes.

  • When some of the key lengths in the indexed columns are variable

    Substitute 12 bytes.

(g) Determining the variable RTHD_RNGIDX

The variable RTHD_RNGIDX is used to determine the amount of real thread private memory to be used when creating range indexes.

Use the following formula to determine its value.

Formula (kilobytes)
RTHD_RNGIDX = ↑(16 + 128 × rngidx_num) × load_rthd ÷ 1,024↑

Explanation of variables

rngidx_num

Number of range indexes defined for the table that is to be imported

load_rthd

Use the formula below to determine the value:

value-specified-for-import-option-adb_import_rthd_num - 1

(h) Determining the variable RTHD_TXTIDX

The variable RTHD_TXTIDX is used to determine the amount of real thread private memory used to build a text index.

Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

Explanation of variables

idx_num

Number of text indexes defined for the table to be processed

RTHD_TXTIDXBUILD_MEM(k)

Use the following formula to determine its value.

Formula (kilobytes)

[Figure]

buff_blk_size

Substitute 4,096.

buff_blk_num

Value specified for the import option adb_import_buff_blk_num

idx_div_num

Length defined for the indexed column for text index k

txt_sort_buff_size

Value specified for the import option adb_import_txt_buff_size

(3) Determining the heap memory requirement (for executing the adbimport command)

Use the following formula to determine the heap memory (HEAP_IMPORTSZ) required to execute the adbimport command.

Formula (kilobytes)

[Figure]

#

If you execute multiple adbimport commands concurrently, determine the memory requirement for each adbimport command. Then, add up the total memory requirements.

Explanation of variables

HEAP_ZLIB

See (a) Determining the variable HEAP_ZLIB.

HEAP_SRTHMEM

See (b) Determining the variable HEAP_SRTHMEM.

(a) Determining the variable HEAP_ZLIB

Use the following formula to determine the value of variable HEAP_ZLIB.

Formula (kilobytes)

[Figure]

Explanation of variables

load_rthd

Use the formula below to determine the value:

value-specified-for-import-option-adb_import_rthd_num - 1

(b) Determining the variable HEAP_SRTHMEM

Use the following formula to determine the value of variable HEAP_SRTHMEM.

Formula (kilobytes)

[Figure]

Explanation of variables

sort_rthd

Use the following formula to determine the value.

value-specified-for-import-option-adb_import_rthd_num - 1