Two ways for DB2 to Improve the Performance of IMPORT commands

Source: Internet
Author: User

The following article mainly introduces two practical methods for DB2 to Improve the Performance of IMPORT commands. The following is a detailed description of the actual operation methods for the two DB2 Methods to Improve the Performance of IMPORT commands, I hope it will help you in this regard. When using the IMPORT Command provided by the DB2 database to IMPORT related data.

All constraints must be verified, and all loaded rows will be logged.

The trigger is also 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, two methods are provided here:

When using the IMPORT Command provided by DB2 for data IMPORT, 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:

 
 
  1. db2 c onnect to sample   
  2. db2 bind db2uimpm.bnd insert buf   
  3. 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:

 
 
  1. db2 connect to sample   
  2. db2 import from myfile of del modified by compound=100 insert into mytable 

The above content is an introduction to the two ways DB2 can improve the performance of IMPORT commands. I hope you will gain some benefits.

The above content describes two ways for DB2 to improve the performance of the IMPORT command. I hope it will help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.