Steps
Follow the steps listed next, to perform a segmented load:
|
Action |
Statement |
|---|---|
|
Load the input records in groups; for example, the first 1,000,000, the second 1,000,000 and so on |
LOAD NO BUILD using the FROM and FOR clauses for each group of input records |
|
Build the table indexes |
BUILD INDEXES NO VALIDATE |
|
Build the indexed constraints |
BUILD CONSTRAINTS NO VALIDATE |
|
Validate the referential constraints of the tables within the segment |
VALIDATE |
Example
This example uses a segmented load to load table EMPLOYEE, which contains more than 2,000,000 rows. By default, each input record is to be stored in the EMPLOYEE table, with each field in the input record corresponding in length and data type to each column defined for the EMPLOYEE table.
The first LOAD statement loads 1,000,000 rows in the table, starting with the first input record. CA IDMS/DB will notify the user for each 100,000 input records processed. The second LOAD statement processes the next 999,999 input records beginning with input record 1,000,001. The third LOAD statement processes the remaining input records.
Because the table is so large, indexes and indexed constraints are built in separate steps using the BUILD statements. Finally, the referential constraints for the table are validated.
load into demoempl.employee no build for 1000000 notify 100000; load into demoempl.employee no build from 1000001 for 999999 notify 100000; load into demoempl.employee no build from 2000000 notify 100000; build indexes for demoempl.employee no validate notify 100000; build constraints for demoempl.employee no validate notify 100000; validate table demoempl.employee notify 100000;
|
Copyright © 2014 CA.
All rights reserved.
|
|