易截截图软件、单文件、免安装、纯绿色、仅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表空间操作详解
  1
  2
  3作者:   来源:    更新日期:2006-01-04 
  5
  6 
  7建立表空间
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

如何解除Oracle 帐号锁定(the account is locked)

解决办法:
1.使用Oracle用户登录系统,在CMD中启用SQLPLUS
2.sqlplus /nolog
3.SQL> connect /as sysdba
      Connected.
4.SQL> alter user system account unlock;
       User altered.
锁定账号方法:
1.SQL> alter user system account lock;
     & ......

Oracle SQL Trace使用实例

为了研究一下系统在后台都干了什么,当然是我在代码里没找到的情况下,研究了一下trace,结果有一定的帮助。oracle中不像sql server中那样直接提供图像化的工具,所以还是得自己动手来做,归纳了一下,步骤如下:
查询session:
SQL> select sid, serial#, username from v$session where username='XXX';//找出你要跟 ......

Oracle 段 区 块

阅读oracle文档的b10743,《conceps》。这本被oracle公司的大师级的人物Michele Cyran等牛人所写,真是一本不错的书籍。可叹英文不太好,但努力,总会有收获的。还是从他的数据架构来说吧!
 (一)Data blocks ,Extents,Segment
    这就是他们之间的逻辑结构。
    先看Data blo ......

对于启动Oracle 10g时 ORA

 问题描述
=======
在试图启动数据库的时候,Oracle报告下列错误:
ERROR:
ORA-27101 Shared memory realm does not exist 
ORA-01034 ORACLE not available
基本解释
=======
Error: ORA-27101 
Text: shared memory realm does not exist 
-------------------------------------------
Ca ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号