Today we are going to discuss with you the correct operation solution for DB2 to Improve the Performance of IMPORT commands. I saw the correct operation solution for DB2 to Improve the Performance of IMPORT commands on the relevant website two days ago, I think it's good. I just want to share it with you.
When using the IMPORT Command provided by the DB2 database to IMPORT data, all constraints must be verified, all loaded rows will be logged, and the trigger will be activated.
Therefore, when loading a large amount of data, the performance of the IMPORT utility is significantly lower than that of the DB2 LOAD utility. To improve the IMPORT performance, here we provide you with two methods.
For the DB2 IMPORT utility, use the COMPOUND option or in the BIND db2uimpm. adding the buffer insertion option to the bnd file can greatly improve the IMPORT performance. In most cases, the imported data volume is large in a partitioned database, these methods are particularly important for improving the IMPORT performance.
The following describes the implementation steps of these two methods:
1. Use the insert buf option to bind the IMPORT utility to enable Buffer Insertion. That is, use the insert buf option to re-bind the db2uimpm package to the database.
For example:
- db2 c onnect to sample
- db2 bind db2uimpm.bnd insert buf
- db2 import from myfile of del insert into mytable
2. Use the COMPOUND option when issuing the IMPORT command for imported data. For example, use COMPOUND = n after the modified by statement to IMPORT n rows of records in the insert statement as a group. Compared with row-by-row record insertion, this method reduces network traffic. The range of COMPOUND is 1-100.
For example:
- db2 connect to sample
- db2 import from myfile of del modified by compound=100 insert into mytable
The above content is an introduction to DB2 to Improve the Performance of IMPORT commands.
The above content is a description of how DB2 improves the performance of the IMPORT command, hoping to help you in this regard.