The following article describes how to log on to and optimize the execution speed of the IBM DB2 database, if you are interested in the practical experience of logging on to and optimizing the execution speed of the IBM DB2 database, you can click the following article to view it.
Run db2cmd in dos and then:
- db2 connect to yourdb user your_user using your_pwd
- db2 sql1.sql
We recommend that you make the following adjustments within 30 seconds after db2 inserts 6000 data records:
1. update db cfg using logfilsiz 51200
2. update db cfg using logbufsz 1024
3. Where do you insert the first 6000 data records and how do you insert them? That is to say, if you use select after the insert statement, check whether your select statement is slow.
4. Execute the following statements for all the tables involved in your insert statement:
- db2 reorg table .
- db2 runstats on table . with distribution and detailed indexes all
5. If the bufferpool used by your tablespace is too small, you must add your bufferpool for db2 "select bpname, pagesize, npages from syscat. bufferpools "command to check the total size of your bufferpool, and then try to increase the buffer size when the total size of all bufferpools cannot exceed 1 GB, adjust the size of the bufferpool using db2 "alter bufferpool ibmdefabp BP size 51200" and above is a summary of the experience in logging on to and optimizing the execution speed of the IBM DB2 database, I hope you will have some gains.
The above content is a summary of the experience in logging on to and optimizing the execution speed of IBM DB2. I hope it will help you in this regard.