Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1814579
  • 博文数量: 524
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 2483
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-25 18:36
个人简介

打杂

文章分类

全部博文(524)

文章存档

2022年(3)

2021年(9)

2019年(1)

2018年(32)

2017年(11)

2016年(152)

2015年(198)

2014年(118)

分类: Oracle

2014-12-08 16:25:36

原文地址:提高 Oracle 数据库插入速度 作者:brjl


主机环境
数据库设置
表属性
语句

裸设备
raid5
raid0
 
检查 force_logging 参数
alter system set "_disable_logging" = true scope = memory;
增大日志组数

initrans 8
下一次扩展100M
alter table test1 allocate extent (size 2g);
去掉无用索引、禁用触发器、如果用到,增大sequence的cache

批量提交
并发插入
INSERT /*+ append */ INTO .....
nologging
 
 
1、alter table tb nologging --若是归档模式下,将表设置为不记录日志
2、drop index index_name.....--若表上有index,先删除表上的index
3、insert /*+append*/ into tb ..... --执行插入
4、create index index_name on .....--重建index
5、alter table tb logging --回复日志记录功能
 
阅读(1729) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~