- 论坛徽章:
- 0
|
问题:load insert数据时是不是会加锁?
表操作需要的锁资源:
对于没有索引的表,插入和更新需要一个锁,增加一个索引需要增加一个锁。即若一个表有2个索引,则在插入和更新这张表的时候需要3个锁。
建议改用:使用dbload命令,控制一次锁的数量,比如每100行数据提交一次,指令格式:
dbload --
DBLOAD Load Utility INFORMIX-SQL Version 7.31.UC6
Copyright (C) Informix Software, Inc., 1984-1998
Software Serial Number AAC#J939800
Usage:
dbload [-d dbname] [-c cfilname] [-l logfile] [-e errnum] [-n nnum]
[-i inum] [-s] [-p] [-r | -k] [-X]
-d database name
-c command file name
-l bad row(s) log file
-e bad row(s) # before abort
-s syntax error check only
-n # of row(s) before commit
-p prompt to commit or not on abort
-i # or row(s) to ignore before starting
-r loading without locking table
-X recognize HEX escapes in character fields
-k loading with exclusive lock on table(s)
cfile 例子:
FILE "table.txt" DELIMITER "|" 14;
INSERT INTO tablename; |
|