Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.5 Collecting cost information

Cost information is collected in order to improve data-search efficiency. This information is related to search methods, and it is collected from base tables, B-tree indexes, and text indexes by using the adbgetcst command. The collected cost information is stored in system tables and used during retrievals.

The following is a specification example of the adbgetcst command.

■ Specification example

USER01 collects cost information from table T1:

adbgetcst -u USER01 -t T1

The following bullet points explain the timing for collecting cost information with the adbgetcst command.

■ Timing for collecting cost information

We recommend that you collect cost information whenever you perform either of the following tasks:

  • Storing data in a base table by executing the adbimport command

    Regardless of whether the creation mode or the addition mode is used, we recommend that you collect cost information whenever you execute the adbimport command to store data in a base table.

  • Adding, updating, or deleting a large amount of data

    We recommend that you collect cost information whenever you have used the INSERT, UPDATE, or DELETE statement to add, update, or delete a large amount of data.

  • Rebuilding indexes by executing the adbidxrebuild command

    We recommend that you collect cost information whenever you have used the adbidxrebuild command to rebuild a B-tree index or text index.

We recommend that you also collect cost information from time to time if you have added, updated, or deleted small amounts of data multiple times, even if you don't process large amounts of data all at once.

When cost information is collected, all rows of the target table are retrieved, which means that it will take a considerable amount of time for the collection processing to be completed.

For details about the adbgetcst command, see adbgetcst (Collect Cost Information) in the manual HADB Command Reference.