Hitachi

Hitachi Advanced Database Command Reference


15.1.1 Collecting cost information

The information used by HADB servers to optimize table retrieval processing is called cost information. The adbgetcst command enables you to store cost information for tables and table indexes in system tables (base tables). If applicable cost information is already stored in the system tables (base tables), the adbgetcst command updates the stored cost information. These operations are referred to as cost-information collection processing.

The following figure provides an overview of cost-information collection processing.

Figure 15‒1: Overview of cost-information collection processing

[Figure]

Explanation:

The adbgetcst command collects cost information from tables and their indexes, and then stores the cost information in system tables (base tables). If the system tables (base tables) already contain cost information for the targeted tables or indexes, the command updates the stored cost information.

Cost information about archived chunks is not collected by cost-information collection processing.

Types of cost information

The following shows the types of cost information that can be collected by the adbgetcst command:

  • Total number of rows stored in the table to be processed

    In the case of row store tables, B-tree indexes are used during collection of this information. For this reason, we recommend that you define B-tree indexes for one or more column in a row store table for which cost information is to be collected.

  • Maximum and minimum values for data stored in each column in the table to be processed

    A range index or B-tree index is used during collection of this information.

  • Characteristics of data (such as the degree of duplication and appearance frequency) stored in the table to be processed

The following explains the file that is used for cost-information collection processing:

We recommend that you use the adbgetcst command to store cost information in the system tables (base tables) after you have performed the following types of processing: