This scenario loads new data in a data warehouse table
periodically from some other source.
About this task
The scenario assumes that the table is type STANDARD during normal operation and that
the CREATE EXTERNAL TABLE statement
has been previously executed and the EXPRESS keyword was specified
in the USING clause.
To refresh a table periodically
Procedure
- Drop all indexes on the table.
- Alter the table to type RAW.
ALTER TABLE tab1 TYPE(RAW);
- Load the new data in the table.
INSERT INTO tab1 SELECT * FROM ext_tab
This insert statement quickly appends new data
to the end of the table, and the operation uses very little log space.
- Verify the integrity of the data.
- Change the table to type STANDARD.
ALTER TABLE tab1 TYPE(STANDARD);
- Re-create indexes on the table so that queries run more
quickly.
- Perform a level-0 backup to enable you to restore the table
later, if necessary. You do not need to perform this level-0 backup
if it would be just as easy to reload the table from the original
source in the case of a problem.