Use the sequence generator identifier to number automatically. This is called the automatic numbering facility. When data is loaded, sequence numbers generated by the sequence generator identifier can be stored in the table columns. This section describes selection criteria for the acquisition methods and storage methods of sequence numbering.
For details about the automatic numbering facility, see the HiRDB Version 9 UAP Development Guide; for details about loading data using the automatic numbering facility, see the manual HiRDB Version 9 Command Reference.
There are three methods for acquiring sequence numbers.
When selecting a method of acquiring sequence numbers, consider the features listed in the following table.
Table 6-3 Features of sequence number acquisition methods
Item considered | Features | ||
---|---|---|---|
Number batch acquisition method | Specification unit acquisition method | Buffer unit acquisition method | |
Missing numbers under normal circumstances | Does not occur. | Missing numbers occur if the number of lines of data loaded is not a multiple of the specified unit. | Does not occur.#2 |
Large quantities of missing numbers during rollbacks | Does not occur. | The current value is not recovered even if a rollback occurs, so large quantities of missing numbers occur. | The current value is not recovered even if a rollback occurs, so large quantities of missing numbers occur. |
Communication overhead when requesting numbering from sequence generator identifier #1 | Since there are only as many numbering requests as there are data load commits, the impact of numbering on performance is kept to a minimum. | The impact on performance can be kept to a minimum by keeping the number of numbering requests down by using large acquisition units. | The impact on performance can be kept to a minimum by keeping the number of numbering requests down by using a large input buffer. However, the unit acquired at one time is determined by the line length calculated from the input buffer size and the column definition size, so a long line requires ample memory in the input buffer. |
Simultaneous execution with UAPs that use the same sequence generator identifier | Cannot execute simultaneously. The sequence generator identifier is locked during data loading. | Can execute simultaneously. | Can execute simultaneously. |
Parallel execution of data loading in RDAREA units | Cannot execute simultaneously. The sequence generator identifier is locked during data loading. | Can execute in parallel. | Can execute in parallel. |
There are three methods for storing sequence numbers. The following describes the criteria to use when you select a method.