Hitachi

Hitachi Advanced Database Setup and Operation Guide


6.12.9 Determining the size of the user logs that are output during execution of the PURGE CHUNK statement (variable max_user_log)

Use the following formula to determine the size of the user logs that are output during execution of the PURGE CHUNK statement.

Formula (bytes)

[Figure]

Explanation of the variables

chunk_num

Number of chunks to be deleted by one PURGE CHUNK statement

TBLCHPRGLOG(j)

Deletion log for the row data held by the chunks in a base table

Use the following formula to determine the value for each chunk to be deleted.

Formula (bytes)

[Figure]

dbarea_file_num

Number of DB area files in data DB area that stores the base table

SGCHTBL

Number of segments allocated by the chunks of the base table

SEGBF

Number of segment blocking factors in the data DB area that stores the base table

page_size

Page size of the data DB area that stores the base table (bytes)

usrlog_file_num

Use the following formula to determine its value.

[Figure]

For details about the number of segments in a data DB area and the segment block factors, see (2) Explanation of variables in 5.8.1 Determining the total number of pages in the data DB area.

For details about the number of user log files required during execution of the PURGE CHUNK statement, see (1) SQL statements for which the number of user log files needs to be estimated in 6.12.15 Determining the number of user log files.

IDXCHPRGLOG(j)

Deletion log for the index data in each chunk of the table to be processed

Use the following formula to determine the value for each chunk to be deleted.

Formula (bytes)

[Figure]

idx_num

Number of indexes defined for the base table to be deleted

dbarea_file_num(i)

Number of DB area files in data DB area that stores the indexes

SGCHIDX(i)

Number of segments allocated by the chunks of indexes

SEGBF(i)

Number of segment blocking factors in the data DB area of each index

page_size(i)

Page size in the data DB area of each index (bytes)

usrlog_file_num

Use the following formula to determine its value.

[Figure]

For details about the number of segments in a data DB area and the segment block factors, see (2) Explanation of variables in 5.8.1 Determining the total number of pages in the data DB area.

For details about the number of user log files required during execution of the PURGE CHUNK statement, see (1) SQL statements for which the number of user log files needs to be estimated in 6.12.15 Determining the number of user log files.

STBLUPDLOG

Update log created when data is deleted from system tables (base tables)

Substitute 480 bytes in the variable STBLUPDLOG.

PRGLOCLOG

Location table update log

Use the following formula to determine this value.

If the table to be processed is not an archivable multi-chunk table, substitute 0. Also, if the chunk to be processed is not archived, substitute 0.

Formula (bytes)

[Figure]

DELLOG

Determine the value from the formula in Size of user logs that are output when a DELETE statement is executed in 6.12.7 Determining the size of the user logs that are output during database updating (variable max_user_log). Note that for some of the variables in the formula, you must substitute values that are different from the values indicated in the preceding section. The following shows the relevant variables and the values to be substituted.

VRWLOG

Substitute 0.

IDXSLOG

To determine the value of the variable IDXSLOG, see (3) Determining the size of the B-tree index user log in 6.12.7 Determining the size of the user logs that are output during database updating (variable max_user_log). Note that for some of the variables in the formula, you must substitute values that are different from the values indicated in the preceding section. The following shows the relevant variables and the values to be substituted.

  • idx_num

    Substitute 1.

  • IDXLOG(i)

    Use the following formula to determine this value.

    Formula

    [Figure]

LROWNUM

Number of archive files created by the adbarchivechunk command

Use the formula for the variable LROWNUM in (f) Determining the variable SGROWTBL (for a multi-chunk table) under (2) Explanation of variables in 5.8.1 Determining the total number of pages in the data DB area. Note that for some of the variables in the formula, you must substitute values that are different from the values indicated in the preceding section. The following shows the relevant variables and the values to be substituted.

  • archive_chunk_num

    Substitute 1.

  • merge_chunk_num

    Substitute 0.

LBP

Use the formula for the variable LBP(i) in (f) Determining the variable SGROWTBL (for a multi-chunk table) under (2) Explanation of variables in 5.8.1 Determining the total number of pages in the data DB area. Note that for some of the variables in the formula, you must substitute values that are different from the values indicated in the preceding section. The following shows the relevant variables and the values to be substituted.

  • LROWNUM

    Substitute the same value as the variable LROWNUM determined before.

page_size

Page size of the data DB area that stores the archivable multi-chunk table (bytes)

del_row_num

Substitute the same value as the variable LROWNUM determined before.