(转)Index-Organized Tables
来源:互联网 发布:乐聘网络 编辑:程序博客网 时间:2024/06/15 17:29
as
select object_id empno,
object_name ename,
created hiredate,
owner job
from all_objects
( "EMPNO" NUMBER PRIMARY KEY,
"ENAME" VARCHAR2(30),
"HIREDATE" DATE,
"JOB" VARCHAR2(30)
)
organization index --指定表为IOT表
IOT表是将表中的行按索引列的顺序组织,注意IOT表不会像sql server中的聚簇索引那样,会占一些空间,除此以前,IOT同SQL Server的簇索引是一样的,它们都是通过B+树来组织。
PCTTHRESHOLD 在数据块中 超过此百分比部分将存储到overflow指定存储空间
OVERFLOW 指定的超过pctthreshold部分的存储空间
INCLUDING 指定列后的数据将存储到overflow data segment;
SQL> create table test(empno number(4) primary key,
2 ename varchar2(10),job varchar2(9),
3 deptno number(2))
4 organization index
5 pctthreshold 20
6 including ename
7 overflow tablespace example;
Table created.
SQL> select index_name, index_type
2 from user_indexes
3 where table_name='TEST';
INDEX_NAME INDEX_TYPE
------------------------------ ---------------------------
SYS_IOT_TOP_30429 IOT - TOP
SQL> alter table test initrans 3 overflow initrans 5;
Table altered.
SQL> alter table test pctthreshold 15 including job;
Table altered.
SQL> desc test;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
DEPTNO NUMBER(2)
SQL> insert into test
2 values(1002,'aaaa','dba',10);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test;
EMPNO ENAME JOB DEPTNO
---------- ---------- --------- ----------
1002 aaaa dba 10
SQL> alter table test move online;
Table altered.
SQL>
另:
--创建IOT表,没有建mapping table:
CREATE TABLE admin_docindex(
token char(20),
doc_id NUMBER,
token_frequency NUMBER,
token_offsets VARCHAR2(512),
CONSTRAINT pk_admin_docindex PRIMARY KEY (token, doc_id))
ORGANIZATION INDEX
TABLESPACE ecic
PCTTHRESHOLD 20
OVERFLOW TABLESPACE ecic;
--创建 mapping table (先)
alter table admin_docindex ORGANIZATION INDEX mapping table;
--创建bitmap index. (后)
CREATE BITMAP INDEX bix_ad
ON admin_docindex(token_frequency);
- (转)Index-Organized Tables
- Oracle Index-Organized Tables
- Index-Organized Tables
- Oracle Index Organized Tables (IOT)
- Converting Index-Organized Tables to Regular Tables
- Comparison of Heap-Organized Tables with Index-Organized Tables
- 3 Indexes and Index-Organized Tables读书笔记
- OCP-043 bitmap indexes on index-Organized Tables
- Overview of Index-Organized Tables【每日一译】--20121231
- Benefits of Index-Organized Tables【每日一译】--20130101
- Index-Organized Table和Clustered Table(转)
- Index-Organized Tables with Row Overflow Area【每日一译】--20130102
- 14.4 Using Index-Organized Tables forPerformance 使用索引组织的表
- IOT(Index Organized Table)
- Index-Organized Table(IOT)
- Heap-Organized table 和 Index-Organized table 说明
- Index-Organized Table和Clustered Table
- Index-Organized Table和Clustered Table
- 【图论】【匹配】pku3715 Blue and Red
- Spring配置中transactionAttributes的意义
- VCS(Veritas Cluster Server)4.0软件安装介绍
- 今天很高兴
- 日期转字符串工具类
- (转)Index-Organized Tables
- 动态数组
- 选中DataGridView行,将数据返填到TextBox控件
- 谁是那个突击的兵?
- web 压力测试
- 忆龙2009:链接glaux.lib出现未解析的符号__ftol2错误
- 八大排序算法总结
- 今天给大家推荐一个免费稳定的ASPX空间。
- Windows Vista 交互式服务编程