DB2 10.5 for Linux, UNIX, and Windows

Load overview

The load utility is capable of efficiently moving large quantities of data into newly created tables, or into tables that already contain data. The utility can handle most data types, including XML, large objects (LOBs), and user-defined types (UDTs). The load utility is faster than the import utility, because it writes formatted pages directly into the database, while the import utility performs SQL INSERTs. The load utility does not fire triggers, and does not perform referential or table constraints checking (other than validating the uniqueness of the indexes).
The load process has several distinct phases (see Figure 1):
  1. Analyze
    When data is being loaded into a column-organized table, the first phase is the analyze phase, which is unique to column-organized tables. The analyze phase occurs only if a column compression dictionary needs to be built, which happens during a LOAD REPLACE operation, a LOAD REPLACE RESETDICTIONARY operation, a LOAD REPLACE RESETDICTIONARYONLY operation, or a LOAD INSERT operation (if the column-organized table is empty). For column-organized tables, this phase is followed by the load, build, and delete phases. The index copy phase applies to row-organized tables only.
  2. Load
    During the load 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.
  3. Build
    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 USE PROFILE option was specified, and profile indicates collecting index statistics). The statistics are similar to those collected through the RUNSTATS command.
  4. Delete
    During the delete phase, the rows that caused a unique or primary key violation are removed from the table. These deleted rows are stored in the load exception table, if one was specified.
  5. Index copy
    During the index copy phase, the index data is copied from a system temporary table space to the original table space. This will only occur if a system temporary table space was specified for index creation during a load operation with the READ ACCESS option specified.
Figure 1. Phases of the Load Process for Row-organized Tables
This graphic shows a time line for the phases of the load process for row-organized tables.
Note: After you invoke the load utility, you can use the LIST UTILITIES command to monitor the progress of the load operation.

The following information is required when loading data:

Load modes

The options you can specify include: