4.2.1 Estimating the size of the DB directory
The following table shows the formulas for estimating the sizes of directories and files in the DB directory based on input data. The sum total of the values estimated for rows 1 through 14 will be the total size of the DB directory.
Based on the size estimated here, use a disk that has a sufficient free space.
No. |
Directory name and file name |
Description |
Formula (gigabytes) |
---|---|---|---|
1 |
$DBDIR/ADBMST |
Master directory DB area file |
0.01 |
2 |
$DBDIR/ADBDIC |
Dictionary DB area file |
0.5 |
3 |
$DBDIR/ADBSTBL |
System-table DB area file |
0.5 |
4 |
$DBDIR/ADBWRK |
Work table DB area file#12 |
org_data#1 x 1#2 |
5 |
$DBDIR/DBAREA#3 |
Data DB area file for storing row store tables |
org_data#1 x 2 |
6 |
Data DB area file for storing column store tables |
org_data#1 |
|
7 |
Data DB area file for storing B-tree indexes |
org_data#1 x 1#4 |
|
8 |
Data DB area file for storing text indexes |
org_data#1 x 1.2#5 |
|
9 |
Data DB area file for storing range indexes |
org_data#1 x 0.00002 + 0.2#6 |
|
10 |
$DBDIR/ADBSYS/ADBSLG |
Directory for system log files |
1#7, #8 |
11 |
$DBDIR/ADBSYS/ADBSTS |
Directory for status files |
|
12 |
$DBDIR/ADBSYS/ADBUTL |
Directory for the command status file |
|
13 |
$DBDIR/ADBWORK#9 |
Work directory#12 |
db_idx x 4#10 |
14 |
$DBDIR/SPOOL#11 |
Error information (core file) output directory#12 |
2 |
- Legend:
-
org_data: Size of the input data file (gigabytes)
db_idx: Value obtained for Data DB area file for storing B-tree indexes in row 7 (gigabytes)
- #1
-
If the input data file has been compressed, substitute the size of the decompressed data.
- #2
-
Because this value varies considerably depending on the results of the SQL statements that use work tables, a larger size than that estimated by this formula might be required.
- #3
-
The name specified by the HADB administrator in the adbinit command.
- #4
-
If you know the data types of the columns for which B-tree indexes are to be defined and the number of data items, using the following formula can yield a more precise estimate. Calculate only the number of B-tree indexes to be stored in the data DB area. Add the calculation result to the value obtained for Data DB area file for storing B-tree indexes in Table 4‒1: Formula (DB directory size).
Formula (gigabytes)
- Explanation of variables
-
-
KEYSZ
Size of the column for which a B-tree index is to be defined (bytes)
For details, see 5.8.4 Determining the key length (KEYSZ) of a B-tree index.
-
row_num
Number of data items in the table in which B-tree indexes are defined
-
ENT_NUM
Use the following formula to calculate a value for this variable.
Formula
-
- #5
-
If notation-correction-search text-index specification or text-index-word-context search specification was specified when defining the text index, use the following formula to determine the size.
Formula (gigabytes)
-
If notation-correction-search text-index specification was specified
-
If text-index-word-context search specification was specified
-
If notation-correction-search text-index specification and text-index-word-context search specification were both specified
-
- #6
-
If the target range index has been defined in a multi-chunk table, use the following formula to determine the size.
Formula (gigabytes)
- Explanation of variables
-
-
chunk_num
Total number of chunks
-
chunk_data(i)
Amount of data in the i-th chunk (gigabytes)
-
- #7
-
Because this value greatly depends on the volume of data handled by the following SQL statements and commands, a larger size than that estimated by the formula might be required depending on the data:
-
Update SQL statement
-
adbimport command
-
adbidxrebuild command
-
adbmergechunk command
-
- #8
-
For rows 10 through 12 combined, use an estimate of 1 gigabyte.
- #9
-
This directory is used when the -w option is not specified for the following commands:
-
adbimport command
-
adbidxrebuild command
-
adbmergechunk command
-
adbunarchivechunk command
-
adbreorgsystemdata command
If the -w option is specified for the above commands, the specified directory is used as the work directory.
-
- #10
-
Used only when executing the following commands:
-
adbimport command
-
adbidxrebuild command
-
adbmergechunk command
-
adbunarchivechunk command
-
adbreorgsystemdata command
Because the value greatly depends on the data types of the columns for which B-tree indexes are defined and the number of B-tree indexes defined, a larger size than that estimated by the formula might be required depending on the data.
If a text index is defined, use the following formula to determine the size.
Formula (gigabytes)
-
- #11
-
The error information (core file) is output when the adb_core_path operand in the server definition is not specified.
- #12
-
When using the multi-node function, the size of this directory or file must be estimated for all nodes.