Quickly loading a new nonlogging table

You quickly create a new nonlogging table and load the table.

About this task

To quickly create and load a new, large table:

Procedure

  1. Create a nonlogging table in a logged database.

    The following sample SQL statements create a nonlogging table:

    CREATE DATABASE history WITH LOG;
    CONNECT TO DATABASE history;
    CREATE RAW TABLE history (...
    );
  2. Load the table using a load utility such as dbexport. For more information about dbexport and dbload, see the HCL OneDB™ Migration Guide.
  3. Perform a level-0 backup of the nonlogging table.

    You must make a level-0 backup of any nonlogging table that has been modified before you convert it to STANDARD type. The level-0 backup provides a starting point from which to restore the data.

  4. Change the nonlogging table to a logging table before you use it in a transaction.

    The following sample SQL statement changes a raw table to a standard table:

    ALTER TABLE largetab TYPE(STANDARD);
    Warning: Do not use nonlogging tables within a transaction where multiple users can modify the data. If you need to use a nonlogging table within a transaction, either set Repeatable Read isolation level or lock the table in exclusive mode to prevent concurrency problems.

    For more information about standard tables, see the previous section, Advantages of logging tables.

  5. Create indexes on columns most often used in query filters.
  6. Create any referential constraints and unique constraints, if needed.