load 是将输入的数据文件直接格式化成数据页存储到数据库中,在装载数据过程中不会触发触发器,并且除了唯一性约束以外不执行引用约束检查或表约束检查,只记录少量日志或不记录日志。因此对于大数据量装入场景下有很高的效率。
--load 常用命令:
db2 "load from xxx.del of del modified by codepage=1208 identityignore / identitymissing /identityoverride insert into from tableName"
--identityignore 忽略自增长
--identitymissing 导入时不包含标识列的值
--identityoverride 使用自增长,ID为空会拒绝
--查看db2 load进度
db2 load query table tableName
db2 list utilities show detail
或者通过db2top命令查看
--终止load操作
db2 "load from xxx.del of del terminate into from tableName"
博客介绍了DB2中load装载数据的原理,它将输入数据文件直接格式化成数据页存到数据库,不触发触发器,少做约束检查和日志记录,适合大数据量装入。还给出常用命令,如装载、查看进度、终止操作等。

2846

被折叠的 条评论
为什么被折叠?



