Hitachi

Hitachi Advanced Database Setup and Operation Guide


6.23.2 Points to consider about the number of processing real threads to be used during command execution

Organization of this subsection

(1) Maximum number of processing real threads that can be used during command execution

When you execute any of the commands listed in Table 6‒28: Operands and command options for specifying the number of processing real threads to be used for command execution, make sure that the number of processing real threads that can be used during command execution as determined using the following formula can be allocated:

Formula
Maximum number of processing real threads that can be used during command execution =
                                     SYS_RTHD_NUM - AP_USE_RTHD_NUM

If you execute multiple commands concurrently, the value to be used is the sum total of the number of processing real threads required for all commands that are executed concurrently.

Explanation of the variables

SYS_RTHD_NUM

Value specified for the adb_sys_rthd_num operand in the server definition

For the adb_sys_rthd_num operand, specify the maximum number of processing real threads that are used to process SQL statements and commands. For details about the adb_sys_rthd_num operand, see the explanation of the adb_sys_rthd_num operand in 7.2.2 Operands related to performance (set format).

AP_USE_RTHD_NUM

Total number of processing real threads used for executing application programs

For details about the number of processing real threads used for executing application programs, see the following operands:

(2) Operands and command options for specifying the number of processing real threads to be used for command execution

Use the operands and command options described in the following table to specify the number of processing real threads to be used for command execution.

Table 6‒28: Operands and command options for specifying the number of processing real threads to be used for command execution

No.

Command name

Operand name

Command option name

Minimum number of processing real threads required

1

adbarchivechunk command

adb_sql_exe_max_rthd_num operand in the server definition

Archive chunk option adb_arcv_rthd_num

3

2

adbexport command

Export option adb_export_rthd_num

3

3

adbgetcst command

Cost-information collection option adb_getcst_rthd_num

2

4

adbidxrebuild command

Index rebuild option adb_idxrebuild_rthd_num

3

5

adbimport command

Import option adb_import_rthd_num

2

6

adbmergechunk command

Merge chunk option adb_mergechunk_rthd_num

3

7

adbunarchivechunk command

Unarchive chunk option adb_unarcv_rthd_num

2

8

adbsql command

  • adb_sql_exe_max_rthd_num operand in the server definition

  • adb_sql_exe_max_rthd_num operand in the client definition

None

0

9

adbreorgsystemdata command#

None

None

3

#

The adbreorgsystemdata command uses three processing real threads. You cannot specify the number of processing real threads in a command option.

In the adb_sql_exe_max_rthd_num operand, you specify the maximum number of SQL processing real threads. If a command option is specified, the command option takes precedence over the adb_sql_exe_max_rthd_num operand.

When you execute commands concurrently, if the maximum number of processing real threads to be used for command execution as determined in (1) Maximum number of processing real threads that can be used during command execution is exceeded, the process of allocating processing real threads might be placed in wait status. If this occurs, command processing continues after other commands or applications terminate, and after the required number of processing real threads has been allocated.

Therefore, when executing the commands explained in Table 6‒28: Operands and command options for specifying the number of processing real threads to be used for command execution concurrently, specify an appropriate number of processing real threads in the operands and command options explained in Table 6‒28: Operands and command options for specifying the number of processing real threads to be used for command execution.

Note

To check the commands that are waiting for processing real threads to be available, execute the adbls -d cnct command. For details about the adbls -d cnct command, see adbls -d cnct (Display the Connection Status) in the manual HADB Command Reference.

(3) Estimating the number of processing real threads to be used for concurrent command execution

If you do not estimate properly the number of processing real threads to be used for command execution, command execution performance will be adversely affected. The following provides guidelines for estimating the number of processing real threads: