When collecting optimizing information by retrieval, you can specify the level of information to be collected. This is called optimizing information collection level.
Table 16-4 shows the advantages and disadvantages of each optimizing information collection level.
Table 16-4 Advantages and disadvantages of each optimizing information collection level
Optimizing information collection level | Advantage | Disadvantage |
---|---|---|
lvl1 |
|
|
lvl2 | Optimizing precision is high because this level lets you incorporate the number of rows in the table, maximum and minimum values, and distribution information, in the optimization and data characteristics in the selection of join order and indexes. |
|
Check the characteristics of the table to be accessed and determine the appropriate optimizing information collection level. In some cases, it may be better to not obtain the optimizing information (to not execute pdgetcst).
If you are not collecting the optimizing information, there is no need to pay attention to the changes made to data by update-SQL. In this case, however, the optimizing precision is not high because the data characteristics are not incorporated in the optimization.
Table 16-5 shows the recommended optimizing information collection level.
Table 16-5 Recommended optimizing information collection level
No. | Characteristics of table to be accessed | Recommended optimizing information collection level |
---|---|---|
1 | Both of the following conditions are satisfied:
| lvl2 |
2 | All of the following conditions are satisfied:
| lvl1 |
3 | Other | Do not collect optimizing information (do not execute pdgetcst). |