易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle 聚集

聚集(cluster)是存储表数据的可选择的方法。一个聚集是一组表,将具有同一公共列值的行存储在一起,并且它们经常一起使用。这些公共列构成聚集码。
经常被同时访问的表在物理位置上可以存储在一起。为了将它们存储在一起,就要创建一个簇( c l u s t e r )来管理这些表。表中的数据一起存储在簇中,从而最小化必须执行的I / O次数,改善系统性能。
表中相关的列称为簇键(cluster key)。簇键用一个簇索引(cluster index)来进行索引;对于簇中的多个表,簇键值只存储一次。在把任何行插入簇的表中之前,都必须先创建一个簇索引。对于经常频繁一起查询的表说,使用簇比较方便。在簇中,来自不同表的行存储在同一个块中;因此同将表分开存储相比,连接这些表的查询就可能执行更少的I / O。不过,与对非。簇表的相同操作比较,簇表的插入、更新和删除性能要差很多。在聚簇表之前,要判断共同查询这些表的频率。如果这些表总是一起查询,就要考虑把它们合并成一个表而不是聚簇两个表。
Examples
1、Creating a Cluster: Example
The following statement creates a cluster named personnel with the cluster key column department, a cluster size of 512 bytes, and storage parameter values:
CREATE CLUSTER personnel
   (department NUMBER(4))
;
2、Cluster Keys: Example
The following statement creates the cluster index on the cluster key of personnel:
CREATE INDEX idx_personnel ON CLUSTER personnel;
After creating the cluster index, you can add tables to the index and perform DML operations on those tables.
3、Adding Tables to a Cluster: Example
The following statements create some departmental tables from the sample hr.employees table and add them to the personnel cluster created in the earlier example:
CREATE TABLE dept_10
   CLUSTER personnel (department_id)
   AS SELECT * from employees WHERE department_id = 10;
CREATE TABLE dept_20
   CLUSTER personnel (department_id)
   AS SELECT * from employees WHERE department_id = 20;
 
 
 
试验:创建表testa、testb、并设置a01、b01共用聚集testclu
     testa--a01
        


相关文档:

Oracle中打开游标超出最大值

 向Oracle数据库表中插入十几万条数据,可是当插入3万多条后,程序就抛
Java代码
ORA-01000 maximum open cursors exceeded  
ORA-01000 maximum open cursors exceeded
异常信息。Google了异常信息,得知这样的错误很容易出现在Java代码中的主要原因是:Java代码在执行conn.crea ......

ORACLE关于数据字典的困惑~

最近在论坛上一直看到有朋友对数据字典里的内容搞不太清楚,比如说V$、V_$、GV$等等,到底哪个是同义词,哪个是视图,哪个基于哪个创建。今天正好看到盖国强的《深入浅出ORACLE》第三章讲到这方面内容,总结一下,也方便大家学习。
 
数据字典由四部分组成:
1、内部RDBMS(X$)表
X$是Oracle数据库的核心部分,这些 ......

oracle比较快的分页sql

 方案1 适用于oracle9i以上!
select * from
(select row_number() over(order by sendid desc) rn,m.* from xxt_msgreceive m )
where rn <1010 and rn>=1000
方案2
SELECT * from (SELECT A.*, ROWNUM RN from (SELECT * from xxt_msg where sendstatus=1  order by msgid desc) A WHERE ROWNUM < ......

sde与oracle的版本问题

1.使用产品:arcsde 9.3+oracle 10.2.0.1
2.问题描述:用arcmap访问空间数据,操作几分钟,arcmap无反应,数据库服务器端cpu占有率100%,gsrvr.exe进程数10+。
3.解决办法:升级oracle版本从10.2.0.1升级到10.2.0.3或者.2.0.4。
4.原因:据esri工程师所称,oracle10.2.0.1版本存在与arcgis不兼容的无法调节的bug。目前升 ......

简便实现Oracle数据库文件移动方法

Oracle数据库在使用过程中,随着数据的增加数据库文件也逐渐增加,在达到一定大小后有可能会造成硬盘空间不足;那么这时我们可以把数据库文件移动到另一个大的硬盘分区中。下面我就以Oracle for Windows版本中把C盘的数据库文件移动到D盘为例介绍Oracle数据库文件移动的方法和步骤。
  1.在sqlplus中连接到要移动文件的Or ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号