oracle数据库以其高可靠性、安全性、可兼容性,得到越来越多的企业的青睐。如何使oracle数据库保持优良性能,这是许多数据库管理员关心的问题,根据笔者经验建议不妨针对以下几个方面加以考虑。
一、分区
根据实际经验,在一个大数据库中,数据空间的绝大多数是被少量的表所占有。为了简化大型数据库的管理,改善应用的查询性能,一般可以使用分区这种手段。所谓分区就是动态表中的记录分离到若干不同的表空间上,使数据在物理上被分割开来,便于维护、备份、恢复、事务及查询性能。当使用的时候可建立一个连接所有分区的视图,使其在逻辑上仍以一个整体出现。
1.建立分区表
create table employee(
empno varchar2(10) primary key,
name varchar2(30),
deptno number(2)
)
partition by range(deptno)
(partition part1 values less than (11)
tablespace part1_ts,
partition part2 values less than(21)
tablespace part2_ts,
partition part3 valuse less than(31)
tablespace part3_ts
partition part4 values less than(maxvalue)
tablespace part4_ts
);
create index employee_deptno on employee (deptno)local(
partition part1 tablespace part1_ndx_ts,
partition part2 tablespace part2_ndx_ts,
partition part3 tablespace part3_ndx_ts,
partition part4 tablespace part4_ndx_ts,
);
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器