Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

19.2.1 Collecting and registering optimizing information

Organization of this subsection
(1) Tables from which to collect optimizing information
(2) Procedure for collecting and registering optimizing information

(1) Tables from which to collect optimizing information

We recommend that you collect optimizing information from all tables, and that you register the information in a dictionary table. If you collect optimizing information from only some of the tables and then register it, exercise care when using a single SQL statement that joins tables to access multiple tables. That is, make sure that tables from which optimizing information has been collected are not joined to tables from which optimizing information has not been collected.

Note that collecting and registering optimizing information does not guarantee that the best access path is selected. To select an even more optimal access path, the user must delete registered optimizing information and tune each SQL statement.

(2) Procedure for collecting and registering optimizing information

The following is the procedure for collecting and registering optimizing information.

Procedure
  1. Determine from which tables to collect optimizing information.
    Taking into consideration the content described in (1) Tables from which to collect optimizing information, determine whether to collect optimizing information, and if so, from which tables to collect it.
  2. Choose the optimizing information collection level.
    Select the optimizing information collection level. We recommend that you select the collection level lvl2, which improves accuracy of optimization.
  3. Collect and register optimizing information.
    Using the pdgetcst command, collect and register optimizing information.
    Command execution example:
    This example collects optimizing information from the table USER1.T1 at the optimizing information collection level lvl2, and then registers the collected information. A pdgetcst command execution example for this operation follows:
     
    pdgetcst -a USER1 -t T1 -c lvl2