Home | Previous Page | Next Page   Managing the High-Performance Loader > Modes >

How Express Mode and Deluxe Mode Work

This discussion describes how HPL implements the deluxe and express modes. You do not need to understand this discussion to use the HPL.

Deluxe Mode

A deluxe-mode load simulates an INSERT statement, except that the HPL allows the load to handle parallel data streams. For more information on the INSERT statement, see the IBM Informix: Guide to SQL Tutorial and IBM Informix: Guide to SQL Syntax.

Express Mode

The sequence of events when you run an express-mode load is as follows:

  1. The onpload utility locks the table with a shared lock.

    Other users can read data in already existing rows.

  2. The onpload utility creates new extents and fills them with the new rows. However, onpload does not update the database structures that track extents.

    The new extents are not visible to the user.

  3. At the end of the express load, onpload updates the internal structures of the database.
  4. The onpload utility sets the table to read-only.

    This setting occurs because in express mode onpload does not log data, and therefore, the table is in an unrecoverable state.

  5. The onpload utility unlocks the table and enables the constraints. The new rows become visible to the user for read only.
  6. The user performs a level-0 backup.

    For more information, see Making a Level-0 Backup.

  7. Your database server sets the table to read/write.

If the load fails, onpload discards the extents and clears the internal information that says the table is unrecoverable.

Foreign-Key Constraints

Express mode cannot disable primary constraints or unique constraints that are referenced as foreign keys that are active on other tables. If you want to load data into such a table, you must first use SET CONSTRAINTS DISABLED statements to disable the foreign-key constraints in the referencing table or tables. After the load is finished, reenable the foreign-key constraints.

Figure 124 shows an example of foreign-key constraints. The table target has a primary key (thePK) and a unique key (unique) that table blue and table green reference. Before you perform an express-mode load into the table target, you must disable the foreign-key constraints in both table blue and table green.

begin figure description - This figure is described in the surrounding text. - end figure description

Figure 124. Foreign-Key Constraints

Comparison Between Express-Mode and Deluxe-Mode Load Operation

The following table contrasts the operation of express mode and deluxe mode. For additional information on the differences between these two modes, see Deluxe Mode and Express Mode.

Express Mode Deluxe Mode
Action Performed by Action Performed by
Set objects to disabled onpload Set constraints to filtering onpload
Load records from the data file into the table (including rows that would cause violations if constraints were on) onpload Load records from data file into the table. Write records that violate constraints into the violations table and not into the target table onpload
Enable objects. Detect violators and copy them into the _vio table. onpload Set constraints to non-filtering onpload
Perform a level-0 backup to make the database writable user
Resolve violators user Resolve violators user
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]