歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> 分析如何提高Import命令的性能

分析如何提高Import命令的性能

日期:2017/3/6 15:49:05   编辑:關於Unix
如果是在分區 數據庫 的環境下,可以利用Buffered Insert來提高IMPORT的 性能 : 在執行IMPORT命令前,要先用INSERT BUF參數重新綁定IMPORT命令對應的綁定文件db2uimpm.bnd 。 例如: db2 connect to 數據庫名 db2 bind db2uimpm.bnd blocking all insert buf
  如果是在分區數據庫的環境下,可以利用Buffered Insert來提高IMPORT的性能:
  在執行IMPORT命令前,要先用INSERT BUF參數重新綁定IMPORT命令對應的綁定文件db2uimpm.bnd 。
  例如:
  db2 connect to 數據庫名
  db2 bind db2uimpm.bnd blocking all insert buf
  db2uimpm.bnd在..sqllib\bnd目錄下。
  
  執行IMPORT命令時使用COMPOUND參數:
  例如:
  db2 connect to 數據庫名
  db2 import from 數據文件名 of ixf modified by compound=100 insert into 表名
  上面的命令中IMPORT會在每100條記錄而不是每條記錄插入後等待返回的SQL執行結果。
  
  如果表中已有數據,將表的屬性修改為APPEND MODE也可以加快IMPORT的性能。

Copyright © Linux教程網 All Rights Reserved