6.12.15 Determining the number of user log files
When specific SQL statements and commands are executed, as many user log files as needed are allocated. As the SQL statements and commands terminate, the user log files are released. Therefore, when you estimate the number of user log files (the variable user_file_num in 6.12 Estimating the size of the system log files), take into account the SQL statements and commands that will be executed concurrently.
If you will be executing multiple SQL statements and commands, use the follow the procedure to determine the number of user log files.
Procedure
-
Determine the number of user log files for all SQL statements and commands that will be executed concurrently.
-
Sum up the numbers of user log files that were obtained.
-
Specify in the adb_log_usrfile_num operand in the server definition a value that is equal to or greater than the obtained sum.
For details about the adb_log_usrfile_num operand in the server definition, see the description of the adb_log_usrfile_num operand in 7.2.3 Operands related to system logs (set format).
- Organization of this subsection
(1) SQL statements for which the number of user log files needs to be estimated
You need to estimate the number of user log files for the following SQL statements:
■ Definition SQL
-
ALTER TABLE statement (when executed to change an archivable multi-chunk table to a regular multi-chunk table)
-
DROP INDEX statement
-
DROP TABLE statement
-
DROP SCHEMA statement
-
DROP USER statement
-
SCHEMA of the REVOKE statement (revoking schema operation privileges)
-
Other definition SQL statements
■ Data Manipulation SQL
-
PURGE CHUNK statement
-
TRUNCATE TABLE statement
-
DELETE statement
-
INSERT statement
-
UPDATE statement
The following formuals explain how to determine the number of user log files for each SQL statement. If the resulting value is 0, use 1.
■ Definition SQL statements
-
Formula for determining the number of user log files that will be needed to execute the ALTER TABLE statement (when executed to change an archivable multi-chunk table to a regular multi-chunk table) (count)
-
Formula for determining the number of user log files needed to execute the DROP INDEX statement (count)
-
Formula for determining the number of user log files needed to execute the DROP TABLE statement (count)
-
Formula for determining the number of user log files needed to execute the DROP SCHEMA statement (count)
See Formula for determining the number of user log files needed to execute the DROP TABLE statement and determine the value for all tables that are included in the target schema. Then, use the largest such value.
-
Formula for determining the number of user log files needed to execute the DROP USER statement (count)
See Formula for determining the number of user log files needed to execute the DROP SCHEMA statement and determine the value for the schemas owned by the target user.
-
Formula for determining the number of user log files that will be needed to execute SCHEMA of the REVOKE statement (count)
See Formula for determining the number of user log files needed to execute the DROP SCHEMA statement to determine the value.
-
Formula for determining the number of user log files that will be needed to execute other definition SQL statements (count)
The value is 1.
■ Data manipulation SQL statements
-
Formula for determining the number of user log files needed to execute the PURGE CHUNK statement (count)
-
Formula for determining the number of user log files needed to execute the TRUNCATE TABLE statement (count)
-
Formula for determining the number of user log files that will be needed to execute the DELETE statement (count)
The value is 1.
-
Formula for determining the number of user log files that will be needed to execute the INSERT statement (count)
The value is 1.
-
Formula for determining the number of user log files that will be needed to execute the UPDATE statement (count)
The value is 1.
- Important
-
If you have specified the adb_sql_exe_max_rthd_num operand in the client definition, assign that same value in the client definition, not the value of the adb_sql_exe_max_rthd_num operand in the server definition.
However, if the value of the adb_sql_exe_max_rthd_num operand in the client definition is greater than the value of the adb_sql_exe_max_rthd_num operand in the server definition, assign the value of the adb_sql_exe_max_rthd_num operand in the server definition.
For details about the adb_sql_exe_max_rthd_num operand in the server definition, see the description of the adb_sql_exe_max_rthd_num operand in 7.2.2 Operands related to performance (set format).
(2) Commands for which the number of user log files needs to be estimated
You need to estimate the number of user log files for the following commands:
-
adbimport command
-
adbidxrebuild command
-
adbmodarea command
-
adbmergechunk command
-
adbgetcst command
-
adbchgchunkcomment command
-
adbchgchunkstatus command
-
adbarchivechunk command
-
adbunarchivechunk command
-
adbreorgsystemdata command
-
adbsyndict command
The following formulas explain how to determine the number of user log files for each command.
-
Formula for determining the number of user log files that will be needed to execute the adbimport command (count)
For details about the import option adb_import_rthd_num, see adbimport (Import Data) in the manual HADB Command Reference.
-
Formula for determining the number of user log files that will be needed to execute the adbidxrebuild command (count)
For details about the index rebuild option adb_idxrebuild_rthd_num, see adbidxrebuild (Rebuild Indexes) in the manual HADB Command Reference.
-
Formula for determining the number of user log files that will be needed to execute the adbmodarea command (count)
The value is 2.
-
Formula for determining the number of user log files that will be needed to execute the adbmergechunk command (count)
For details about the merge chunk option adb_mergechunk_rthd_num, see adbmergechunk (Merge Chunks) in the manual HADB Command Reference.
-
Formula for determining the number of user log files that will be needed to execute the adbgetcst command (count)
The value is 1.
-
Formula for determining the number of user log files that will be needed to execute the adbchgchunkcomment command (count)
The value is 1.
-
Formula for determining the number of user log files that will be needed to execute the adbchgchunkstatus command (count)
The value is 1.
-
Formula for determining the number of user log files that will be needed to execute the adbarchivechunk command (count)
For details about the archive chunk option adb_arcv_rthd_num, see adbarchivechunk (Archive Chunk) in the manual HADB Command Reference.
-
Formula for determining the number of user log files that will be needed to execute the adbunarchivechunk command (count)
For details about the unarchive chunk option adb_unarcv_rthd_num, see adbunarchivechunk (Unarchive Chunk) in the manual HADB Command Reference.
-
Formula for determining the number of user log files that will be needed to execute the adbreorgsystemdata command (count)
The value is 5.
-
Formula for determining the number of user log files that will be needed to execute the adbsyndict command (count)
The value is 1.