日期:2014-05-17  浏览次数:20769 次

关于oracle10g插入慢的问题,求解答。。。
1.oracle安装信息:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

2.服务器:
centOS5.5,16G内存,500G硬盘,8核CPU

3.主要技术:spring3.0+mybatis

4.数据插入方式:
insert into table....(1000条commit一次)
换成insert talbe select ... from dual union all select ....(也快不了多少)
表中有索引,触发器,主键用sequence通过触发器插入。。。
现在是做数据库适配,mysql插入速度很快,但换成oracle就很慢了(odbc14.jar)。

4.索引,触发器不可能先删除等初始化数据后再重建,不能alter table .. nologging;

各位有什么办法解决oralce10g插入慢的问题吗?谢谢



------解决方案--------------------
重建临时表
create table  temp  as select * from  table_name;
然后重建主键和索引。
然后删除表
最后 重新命名 alter  table  rename
------解决方案--------------------
redo的情况如何

为什么redo写入时间这么久,是不是redo太小了