Is dbload lock the database untill it finish?
Posted in 2000
Topics: General Discussion
Is true dbload lock the database until it finish?
If I insert few thousand of rows into a table. Is do the dbload more
efficient or just insert row by row?
Do buffered log or do unbuffered log? Buffered/Unbuffered logging will
causes
locking when it exceeds the limit. No logging will no rollback/commit
allows.
What are your approach?
Raymond Chui wrote:
>
> Is true dbload lock the database until it finish?
No. Dbload will NEVER lock the database. Optionally the -k flag will
cause dbload to lock exclusively the TABLE for the duration of the
operation but not by default.
> If I insert few thousand of rows into a table. Is do the dbload more
> efficient or just insert row by row?
DBload will be MUCH faster.
> Do buffered log or do unbuffered log? Buffered/Unbuffered logging will
> causes
> locking when it exceeds the limit. No logging will no rollback/commit
> allows.
Buffered -vs- unbuffered logging is your choice. Personally I use
UNBUFFERED logging since it is more secure. The logical log buffers are
flushed at the completion of ANY transaction rather than waiting until they
are filled. This improves the chances that transactions that have been
acknowledged will not be lost in a hard system crash be being rolled back
during fast recovery because the transactions COMMIT record was never
flushed.
You can use the dbload -n <num> flag to specify the number of rows inserted
between commits. Then dbload will perform partial commits of the load
every <num> rows so that you do not use up locks or create a long
transaction problem.
> What are your approach?
Art S. Kagel