Hitachi

Hitachi Advanced Database Command Reference


15.2.2 Format of the cost-information collection option

Organization of this subsection

(1) Specification format

[set adb_getcst_rthd_num = number-of-processing-real-threads-to-be-used-by-adbgetcst-command]
[set adb_getcst_collect_time = time-for-collecting-cost-information]

The specification rules for this cost information collection option are the same as for the server definition. For details about the specification rules for the server definition, see Syntax rules for the server definition in the HADB Setup and Operation Guide.

(2) Explanation of specification format

adb_getcst_rthd_num = number-of-processing-real-threads-to-be-used-by-adbgetcst-command

~<integer> ((2 to 4,096))

Specifies the number of processing real threads to be used for executing the adbgetcst command.

Specification of this option is recommended. The adbgetcst command uses the number of processing real threads specified by this option. Therefore, specify an appropriate number of processing real threads for use by the adbgetcst command. For details about the processing of the adbgetcst command that uses processing real threads and the number of processing real threads to be used for each step, see 15.1.3 Relationships among threads used by the adbgetcst command.

If this option is omitted, the number of processing real threads to be used for executing the adbgetcst command is determined by the adb_sql_exe_max_rthd_num operand in the server definition. The following table shows the relationship between the value of this option or the adb_sql_exe_max_rthd_num operand in the server definition and the number of processing real threads used for executing the command.

Table 15‒1: Number of processing real threads used for executing the command

No.

Value in this option or in the server definition

Number of processing real threads used for executing the command

1

When this option is omitted

If the adb_sql_exe_max_rthd_num operand in the server definition is not specified

The default value of the adb_sql_exe_max_rthd_num operand in the server definition is used.

2

If 0 or 1 is specified in the adb_sql_exe_max_rthd_num operand in the server definition

--

3

If 2 or a greater value is specified for the adb_sql_exe_max_rthd_num operand in the server definition

The value specified for the adb_sql_exe_max_rthd_num operand in the server definition is used.

4

If 2 or a greater value is specified in this option

The value specified in this option is used.

Legend:

--: The adbgetcst command results in an error.

Note:

For details about the adb_sql_exe_max_rthd_num operand in the server definition, see Operands related to performance (set format) in the HADB Setup and Operation Guide.

adb_getcst_collect_time = time-for-collecting-cost-information

~<integer>((0, 5 to 1,440))<<10>> (minutes)

Specifies in minutes the time during which cost information for the table to be processed is collected.

If this option is specified, only the cost information that was collected within the specified period of time is stored in the system table. If you want to collect all cost information for the table to be processed regardless of the cost information collection time, specify 0 for this option.

If the -t option of the adbgetcst command is omitted, cost information for all tables in the schema is collected. At this time, the value of this option is applied to each table in the schema that has the authorization identifier specified in the -u option. If cost information collection for the table to be processed does not finish in the time specified for this option, the cost information that was collected until the specified time has passed is stored in the system table. Then, cost information collection begins for the next table to be processed.

The following table shows the relationship between the value specified for this option and cost information stored in the system table.

Table 15‒2: Relationship between the value of this option and cost information stored in the system table

No.

Value of this option

Time required for collecting cost information for the table to be processed

Cost information stored in the system table

1

The option is omitted or 5 or a greater value is specified.

Longer than the time specified for this option (or the default value)

Cost information# collected until the time specified for this option (or the default value) has passed

If the time specified for this option has passed during cost information collection processing (after the KFAA80235-I is output and until the KFAA80236-I message is output), the KFAA80237-I message is output.

If cost information is to be collected for all tables in the schema, when the time specified for this option has passed, cost information collection for the next table to be processed begins. At this time, the KFAA80237-I message is output.

2

Equal to or shorter than the time specified for this option (or the default value)

All cost information for tables to be processed

If cost information is to be collected for all tables in the schema, when cost information collection for the table to be processed is completed, cost information collection for the next table begins.

3

If 0 is specified

--

All cost information for tables to be processed

If cost information is to be collected for all tables in the schema, when cost information collection for the table to be processed is completed, cost information collection for the next table begins.

Legend:

--: Not applicable. All cost information for the table to be processed is collected, regardless of the cost information collection time.

#

Compared to a case in which all cost information for the table to be processed is collected, optimization of SQL statements (results of access path selection) might be different.