Home > Database > Mysql Tutorial > DB2 import数据导入的skipcount参数使用方法

DB2 import数据导入的skipcount参数使用方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:48:42
Original
2245 people have browsed it

DB2 import和load比起性能来由于会记录日志,所以通过速度比较慢,并且数据记录太大容易造成事物日志满的问题发生,但有些操作不

DB2 import和load比起性能来由于会记录日志,所以通过速度比较慢,并且数据记录太大容易造成事物日志满的问题发生,但有些操作不得不记日志,所以就不得不适用import,不过其有个COMMITCOUNT选项完全可以避免,来指定import多少条记录即提交,,有助于及时释放日志:

并且由于及时提交了,所以在运行失败了还可以重新在起点继续进行操作:

db2 "import from tab1.ixf of ixf modified by generatedignore COMMITCOUNT 500000 insert into  RCDB2.T_CUST_DTL"

上面我设置每导入50W条记录就提交,然而导入中发现索引表空间不足,会话运行失败:
SQL3306N  An SQL error "-289" occurred while inserting a row into the table.
SQL0289N  Unable to allocate new pages in table space "RCDB2_INDX_01". 
SQLSTATE=5701

查询目前已经成功导入的数据量如下:

db2 select count(*) from RCDB2.T_CUST_DTL with ur

1
-----------
    5000000

  1 record(s) selected.

这个就可以作为重新导入的起点。

db2 "import from tab1.ixf of ixf modified by generatedignore COMMITCOUNT 500000 SKIPCOUNT 5000000 insert into  RCDB2.T_CUST_DTL"

另外还有个参数RESTARTCOUNT N何SKIPCOUNT等效, 跳过前N条记录继续import,想当的方便

DB2数据库性能调整和优化(第1、2版) PDF

DB2数据库性能优化介绍

本文永久更新链接地址:

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
javascript - es6 import import problem
From 1970-01-01 08:00:00
0
0
0
Import jQuery files
From 1970-01-01 08:00:00
0
0
0
Database file import
From 1970-01-01 08:00:00
0
0
0
Data import issues
From 1970-01-01 08:00:00
0
0
0
java import problem
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template