Load continuation
If you enable load continuation, the system ensures that a simple load that uses external tables continues after the system is paused and resumed. You do not have to stop and resubmit the load.
-
- Issue the nzload command with the -allowReplay n option, where n is a nonzero number. The value of n specifies the number of allowable restarts; the option sets the LOAD_REPLAY_REGION session variable to 1 and the MAX_QUERY_RESTART session variable to n. If you do not specify the -allowReplay option or the option setting is 0, the system uses the Postgres default setting.
- Perform the following steps:
- Issue the nzsql command.
- Manually set the LOAD_REPLAY_REGION session variable to true or 1.
- Manually set the MAX_QUERY_RESTART session variable to a nonzero number.
- Load the data by using the following statement:
If you set the session variables as described, restarts are allowed. Otherwise, the system uses the Postgres default setting.insert into target select * from external table external_table using …
- Specify the -allowReplay option of the nzload command or set the LOAD_REPLAY_REGION session variable to 1 or true, the system ensures that a simple load that uses external tables continues after the system is paused and resumed. You do not have to stop and resubmit the load.
When you enable load continuation, the system holds the records to be sent to the SPU in the replay region in host memory. After the system sends the data in this region to the SPUs, it does a partial commit that forces all the unwritten data to the disks and allows the system to reuse the data buffers of the reload region. If a SPU reboots or resets, the system rolls back to the last partial commit and reprocesses and resends the data.
Setting the LOAD_REPLAY_REGION and MAX_QUERY_RESTART session variables, either indirectly by using the -allowReplay option or by setting the session variables manually, has a performance impact, which depends on the speed of the incoming data.
ALTER VIEWS ON <table> MATERIALIZE SUSPEND
ALTER VIEWS ON <table> MATERIALIZE REFRESH