oracle iot索引組織表(二)
---如iot分割槽,overflow segment也基於主鍵進行對應分割槽
If table is partitioned, then the database equipartitions the overflow data segments with the primary key index segments.
ORA-25175: no PRIMARY KEY constraint found
SQL> create table t_test(a int primary key) organization index mapping table;
create table t_test(a int primary key) organization index mapping table
ORA-00955: name is already used by an existing object
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index nomapping;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users compress 2;
create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users compress 2
ORA-00922: missing or invalid option
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 nocompress including a overflow tablespace users;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 b compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 b compress 2 including a overflow tablespace users
ORA-00922: missing or invalid option
---compress的級別為主鍵列-1
SQL> create table t_test(a int ,b int,c int,primary key(a,b)) organization index mapping table pctthreshold 2 compress 1 including c overflow tablespace users;
Table created
----iot的操作限制:
Restrictions on Index-Organized Tables Index-organized tables are subject to the following restrictions:
----iot僅儲存邏輯rowid而非物理rowid,最好用urowid;
The ROWID pseudocolumn of an index-organized table returns logical rowids instead of physical rowids. A column that you create of type
ROWID cannot store the logical rowids of the IOT. The only data you can store in a ROWID column is rowids from heap-organized tables.
If you want to store the logical rowids of an IOT, then create a column of type UROWID instead. A column of type UROWID can store both
physical and logical rowids.
--iot不能定義虛擬列
You cannot define a virtual column for an index-organized table.
--iot不能定義組合範圍,雜湊,列表分割槽子句
You cannot specify the composite_range_partitions, composite_hash_partitions, or composite_list_partitions clauses for an index-organized table.
----如iot是nested tqble or varray,則不能指定表分割槽語句
If the index-organized table is a nested table or varray, then you cannot specify table_partitioning_clauses.
---iot應用場景
----適用於基於主鍵訪問表,可考慮替換為iot
Index-organized tables are therefore best suited for primary key-based access and manipulation. An index-organized table is an alternative to:
----如一個非集表建立了create index主鍵
A noncluster table indexed on the primary key by using the CREATE INDEX statement
---儲存在索引cluster的cluster table用cleate cluster,表的主鍵對映到cluster key
A cluster table stored in an indexed cluster that has been created using the CREATE CLUSTER statement that maps the primary key for the table to the cluster key
If table is partitioned, then the database equipartitions the overflow data segments with the primary key index segments.
ORA-25175: no PRIMARY KEY constraint found
SQL> create table t_test(a int primary key) organization index mapping table;
create table t_test(a int primary key) organization index mapping table
ORA-00955: name is already used by an existing object
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index nomapping;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users compress 2;
create table t_test(a int primary key) organization index mapping table pctthreshold 2 including a overflow tablespace users compress 2
ORA-00922: missing or invalid option
SQL> create table t_test(a int primary key) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 nocompress including a overflow tablespace users;
Table created
SQL> drop table t_test purge;
Table dropped
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 compress 2 including a overflow tablespace users
ORA-25193: cannot use COMPRESS option for a single column key
SQL> create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 b compress 2 including a overflow tablespace users;
create table t_test(a int primary key,b int) organization index mapping table pctthreshold 2 b compress 2 including a overflow tablespace users
ORA-00922: missing or invalid option
---compress的級別為主鍵列-1
SQL> create table t_test(a int ,b int,c int,primary key(a,b)) organization index mapping table pctthreshold 2 compress 1 including c overflow tablespace users;
Table created
----iot的操作限制:
Restrictions on Index-Organized Tables Index-organized tables are subject to the following restrictions:
----iot僅儲存邏輯rowid而非物理rowid,最好用urowid;
The ROWID pseudocolumn of an index-organized table returns logical rowids instead of physical rowids. A column that you create of type
ROWID cannot store the logical rowids of the IOT. The only data you can store in a ROWID column is rowids from heap-organized tables.
If you want to store the logical rowids of an IOT, then create a column of type UROWID instead. A column of type UROWID can store both
physical and logical rowids.
--iot不能定義虛擬列
You cannot define a virtual column for an index-organized table.
--iot不能定義組合範圍,雜湊,列表分割槽子句
You cannot specify the composite_range_partitions, composite_hash_partitions, or composite_list_partitions clauses for an index-organized table.
----如iot是nested tqble or varray,則不能指定表分割槽語句
If the index-organized table is a nested table or varray, then you cannot specify table_partitioning_clauses.
---iot應用場景
----適用於基於主鍵訪問表,可考慮替換為iot
Index-organized tables are therefore best suited for primary key-based access and manipulation. An index-organized table is an alternative to:
----如一個非集表建立了create index主鍵
A noncluster table indexed on the primary key by using the CREATE INDEX statement
---儲存在索引cluster的cluster table用cleate cluster,表的主鍵對映到cluster key
A cluster table stored in an indexed cluster that has been created using the CREATE CLUSTER statement that maps the primary key for the table to the cluster key
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-753208/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 索引組織表(IOT)Oracle索引
- oracle iot索引組織表(一)Oracle索引
- 索引組織表(index organized table ,IOT)索引IndexZed
- Oracle堆組織表的索引和索引組織表Oracle索引
- oracle 索引組織表Oracle索引
- 在OLTP系統使用索引組織表IOT索引
- 索引組織表上建立BITMAP索引(二)索引
- ORACLE索引組織表討論Oracle索引
- 索引組織表上建立BITMAP索引(三)索引
- 索引組織表上建立BITMAP索引(一)索引
- 索引組織表(Index Organizied Table)索引Index
- [20120324]IOT索引組織表相關資訊的學習(二).txt索引
- 資料庫表,索引(索引組織表,聚簇表,聚簇索引,)資料庫索引
- Oracle 堆組織表(HOT)Oracle
- [20120509]IOT索引組織表相關資訊的學習(三).txt索引
- [20120509]IOT索引組織表相關資訊的學習(四).txt索引
- SQL Server 重新組織生成索引SQLServer索引
- [20151008]索引組織表上建立BITMAP索引.txt索引
- [20120228]IOT索引組織表相關資訊的學習.txt索引
- oracle IOT表學習Oracle
- 索引與null(二):組合索引索引Null
- 風雲突變的NB-IoT、LoRa產業組織格局產業
- oracle重建索引(二)Oracle索引
- ORACLE 組合索引 使用分析Oracle索引
- Oracle DBA的資源和組織Oracle
- oracle分割槽索引(二)Oracle索引
- oracle 巢狀表 索引表 使用Oracle巢狀索引
- oracle 表分析和索引Oracle索引
- 【BUG】當使用TTS(傳輸表空間時)從其他平臺到HP可造成索引組織表損壞TTS索引
- Oracle表與索引的分析及索引重建Oracle索引
- Oracle大表快速建立索引Oracle索引
- oracle 定期表及索引分析Oracle索引
- EXCEL破冰 - 如何為透視表組織資料Excel
- Oracle表與索引的分析及索引重建(轉)Oracle索引
- oracle 線上重組表Oracle
- Oracle表、索引修改表空間語句Oracle索引
- 【TUNE_ORACLE】Oracle索引設計思想(二)索引過濾列概述Oracle索引
- Oracle 找出需要建立索引的表Oracle索引