Chapter 4. Command and utility considerations 311
4.5 Load
The load utility moves data from files, named pipes, devices, or a cursor into a
DB2 table.
The following subsections are organized in this way:
򐂰 Brief description
򐂰 Performance considerations
򐂰 Best practices
4.5.1 Brief description
The load utility is capable of efficiently moving large quantities of data into newly
created tables, or into tables that already create contain data. If the table
receiving the new data already contains data, you can replace or append to the
existing data. The load utility can handle most data types, including large objects
(LOBs) and user-defined data types (UDTs).
The SET INTEGRITY statement has to be executed against the table to validate
referential or table constraints.
The load process consists of four distinct phases, as follows:
1. Load phase during which the data is written to the table. During this phase,
data is loaded into the table, and index keys and table statistics are collected,
if necessary. Save points, or points of consistency, are established at intervals
specified through the SAVECOUNT parameter in the LOAD command. Messages
are generated, indicating how many input rows were successfully loaded at
the time of the save point.
While the load operation is taking place, the target table is in the “load in
progress” state. If the table has constraints, the table will also be in the “check
pending” state. If the ALLOW READ ACCESS option was specified, the table will
also be in the “read access only” state.
2. Build phase during which indexes are produced. During the build phase,
indexes are produced based on the index keys collected during the load
phase. The index keys are sorted during the load phase, and index statistics
are collected (if the STATISTICS YES with INDEXES option was specified). The
statistics are similar to those collected through the RUNSTATS command. If a
Note: The load utility does not fire triggers, and does not perform referential or
table constraints checking; instead, it only validates the uniqueness constraint
of indexes.

Get DB2 UDB ESE V8 non-DPF Performance Guide for High Performance OLTP and BI now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.