Escolar Documentos
Profissional Documentos
Cultura Documentos
LOAD TABLE statement might sit and wait before starting to run because it
cant get the exclusive lock, and once it starts running other users might be
blocked until LOAD TABLE finishes. LOAD TABLE doesnt do commits
along the way, just one commit if it works or a rollback if it fails.
The third shortcut is that LOAD TABLE does not write the individual
inserted rows to the transaction log file, just a record of the LOAD TABLE
command itself. This means that LOAD TABLE should not be used on a table
that is being uploaded via MobiLink if you want the inserted rows to be
included in the upload stream. MobiLink determines which rows to upload by
examining the transaction log, and rows inserted via LOAD TABLE will be
missed. (For more information about MobiLink, see Chapter 7,
Synchronizing.)
The third shortcut also has implications for recovery using the transaction
log if WITH CHECKPOINT isnt specified to force a checkpoint when the
LOAD TABLE is finished. Since the transaction log only contains the LOAD
TABLE command itself, not the individual rows, the original file must still be
available for a recovery process to work.
Here is an example to show what LOAD TABLE actually writes to the
transaction log:
CREATE TABLE t1 (
key_1 INTEGER NOT NULL,
col_2 INTEGER NOT NULL,
PRIMARY KEY ( key_1 ) );