6.13 Estimating the size of the archive directory
This section describes how to determine the size of the archive directory. You must determine the size of the archive directory before you define archivable multi-chunk tables.
Use the following formula to determine the size of the archive directory (ARCVDIRSIZE).
Formula (gigabytes)
Explanation of variables
- tbl_num_in_arcvdir
-
Number of archivable multi-chunk tables that use the target archive directory
Substitute for this variable the number of archivable multi-chunk tables that are defined by specifying the target archive directory for ARCHIVEDIR in the chunk-archive specification when the CREATE TABLE statement is executed.
- ALLARCVCHKSIZE(i)
-
Total size of all archived chunks in the i-th archivable multi-chunk table
Use the following formula to determine the variable ALLARCVCHKSIZE (total size of all archived chunks in the archivable multi-chunk table).
Formula (gigabytes)
- arcvchk_num_in_tbl
-
Total number of archived chunks in the archivable multi-chunk table
- ARCVCHKSIZE(i)
-
Size of the i-th archived chunk in the archivable multi-chunk table
Use the following formula to determine the variable ARCVCHKSIZE (size of archived chunks).
Formula (gigabytes)
- chunk_data
-
Size of input data to be stored in a chunk (gigabytes)
- compression_rate
-
Compression rate of input data to be stored in a chunk
To determine the variable compression_rate, perform the following procedure by using part of input data.
Procedure:
-
Define an archivable multi-chunk table.
For details about how to define an archivable multi-chunk table, see CREATE TABLE (define a table) in Definition SQL in the manual HADB SQL Reference.
-
Execute the adbimport command with the -b option specified to store part of input data in the archivable multi-chunk table.
For details about the adbimport command, see adbimport (Import Data) in the manual HADB Command Reference.
-
Use the adbdbstatus command to check the size of the chunk that was created in step 2.
Execute the adbdbstatus command with the -d used and -c table options specified to output the information about the usage of DB areas, tables, and indexes. Determine the size of the chunk that was created in step 2 by using the following formula based on the values in the output information.
Formula
For details about the adbdbstatus command, see adbdbstatus (Analyze the Database Status) in the manual HADB Command Reference.
-
Use the adbarchivechunk command to archive the chunk that was created in step 2.
For details about the adbarchivechunk command, see adbarchivechunk (Archive chunk) in the manual HADB Command Reference.
-
Use the adbdbstatus command to check the size of the chunk that was archived in step 4.
Execute the adbdbstatus command with the -d used option and -c archivechunk options specified to output information about the usage of archived chunks. Check the size of the archived chunk from the value of the output item Archive_file_size.
-
Determine the compression rate from the chunk sizes that you checked in steps 3 and 5.
Use the following formula to determine the value.
Formula
- after_comp_somedata
-
Size of the chunk that you checked in step 5 (bytes)
This is the size of the chunk that was archived by using the adbarchivechunk command. The input data has been compressed because the chunk has been archived.
- before_comp_somedata
-
Size of the chunk that you checked in step 3 (bytes)
This is the size of the chunk that existed before being archived by using the adbarchivechunk command. The input data has not been compressed because the chunk has not been archived.
-