现有一台oracle服务器,平均每分钟有2W条记录要insert,但经过测试每分钟insert记录大概8000左右。
问:如何提高每分钟insert记录数量,满足每分钟insert记录大于2W注:测试时,采用了分批5000条提交一次请高手指点

解决方案 »

  1.   


    1. 采用高速的存储设备,提高读写能力,我们公司用的是EMC 和NetApp,2. 采用不写日志及使用append提示减少数据操作的时间。建议方案是先修改表为不写日志: 
    sql> alter   table   table_name   NOLOGGING; INSERT   /*+Append*/   INTO     tab1 
          SELECT   *   FROM   tab2;插入完数据后,再修改表写日志: 
    sql> alter   table   table_name   LOGGING; 这里的区别就在于如果插入数据的同时又写日志,尤其是大数据量的insert操作,需要耗费较长的时间。3. 用EXP/IMP 处理大量数据(1)给当前的两个表分别改名 
    alter   table   tab1   rename   to   tab11; 
    alter   table   tab2   rename   to   tab1; 
    (2)导出改名前的tab2 
    exp   user/pwd@...   file=...   log=...   tables=(tab1) 
    (3)把名字改回来 
    alter   table   tab1   rename   to   tab2; 
    alter   table   tab11   rename   to   tab1; 
    (4)导入数据 
    imp   user/pwd@...   file=...   log=...   fromuser=user   touser=user   tables=(tab1)