Heap-Organized table 和 Index-Organized table 说明
官网的两个连接如下:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/tablecls.htm#i20438
Indexes and Index-Organized Tables
http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/indexiot.htm#CBBFIFAB
You can create a relational table with the following organizational characteristics:
(2)An index-organized table orders rows according to the primary key values. For some applications, index-organized tables enhance performance and use disk space more efficiently. See "Overview of Index-Organized Tables".
Rowid Data Types
Every row stored in the database has an address. Oracle Database uses a ROWID data type to store the address (rowid) of every row in the database. Rowids fall into the following categories:
(2)Logical rowids store the addresses of rows in index-organized tables.
A data type called the universal rowid, or UROWID, supports all kinds of rowids.
(1)Rowids are the fastest means of accessing particular rows.
(2)Rowids provide the ability to see how a table is organized.
(3)Rowids are unique identifiers for rows in a given table.
A table cluster is a group of tables that share common columns and store related data in the same blocks. When tables are clustered, a single data block can contain rows from multiple tables. For example, a block can store rows from both the employees and departments tables rather than from only a single table.
(1)Disk I/O is reduced for joins of clustered tables.
(2)Access time improves for joins of clustered tables.
Typically, clustering tables is not appropriate in the following situations:
(1)The tables are frequently updated.
(2)The tables frequently require a full table scan.
(3)The tables require truncating.
Overview of Index-Organized Tables
An index-organized table is a table stored in a variation of a B-tree index structure.
In a heap-organized table, rows are inserted where they fit.
In an index-organized table, rows are stored in an index defined on the primary key for the table.
Index-organized tables provide faster access to table rows by primary key or a valid prefix of the key. The presence of non-key columns of a row in the leaf block avoids an additional data block I/O.
Index-organized tables are useful when related pieces of data must be stored together or data must be physically stored in a specific order. This type of table is often used for information retrieval, spatial (see "Overview of Oracle Spatial"), and OLAP applications (see "OLAP").
Index-Organized Table Characteristics
Table 3-4 Comparison of Heap-Organized Tables with Index-Organized Tables
Heap-Organized Table |
Index-Organized Table |
The rowid uniquely identifies a row. Primary key constraint may optionally be defined. |
Primary key uniquely identifies a row. Primary key constraint must be defined. |
Physical rowid in ROWID pseudocolumn allows building secondary indexes. |
Logical rowid in ROWID pseudocolumn allows building secondary indexes. |
Individual rows may be accessed directly by rowid. |
Access to individual rows may be achieved indirectly by primary key. |
Sequential full table scan returns all rows in some order. |
A full index scan or fast full index scan returns all rows in some order. |
Can be stored in a table cluster with other tables. |
Cannot be stored in a table cluster. |
Can contain a column of the LONG data type and columns of LOB data types. |
Can contain LOB columns but not LONG columns. |
Can contain virtual columns (only relational heap tables are supported). |
Cannot contain virtual columns. |
Figure 3-3 illustrates the structure of an index-organized departments table. The leaf blocks contain the rows of the table, ordered sequentially by primary key. For example, the first value in the first leaf block shows a department ID of 20, department name of Marketing, manager ID of 201, and location ID of 1800.
Figure 3-3 Index-Organized Table
Description of "Figure 3-3 Index-Organized Table"
Leaf block 2 in an index-organized table might contain entries as follows:
Block 2 contains rows for the same table as follows:
Thus, the number of block I/Os in this example is double the number in the index-organized example.
· "Introduction to Logical Storage Structures"
Index-Organized Tables with Row Overflow Area
When creating an index-organized table, you can specify a separate segment as a row overflow area. In index-organized tables, B-tree index entries can be large because they contain an entire row, so a separate segment to contain the entries is useful. In contrast, B-tree entries are usually small because they consist of the key and rowid.
If a row overflow area is specified, then the database can divide a row in an index-organized table into the following parts:
(1)The index entry
This part contains column values for all the primary key columns, a physical rowid that points to the overflow part of the row, and optionally a few of the non-key columns. This part is stored in the index segment.
(2)The overflow part
This part contains column values for the remaining non-key columns. This part is stored in the overflow storage area segment.
Secondary Indexes on Index-Organized Tables
A secondary index is an index on an index-organized table. In a sense, it is an index on an index. The secondary index is an independent schema object and is stored separately from the index-organized table.
As explained in "Rowid Data Types", Oracle Database uses row identifiers called logical rowids for index-organized tables. A logical rowid is a base64-encoded representation of the table primary key. The logical rowid length depends on the primary key length.
Rows in index leaf blocks can move within or between blocks because of insertions. Rows in index-organized tables do not migrate as heap-organized rows do (see "Chained and Migrated Rows"). Because rows in index-organized tables do not have permanent physical addresses, the database uses logical rowids based on primary key.
Secondary indexes provide fast and efficient access to index-organized tables using columns that are neither the primary key nor a prefix of the primary key. For example, a query of the names of departments whose ID is greater than 1700 could use the secondary index to speed data access.
Logical Rowids and Physical Guesses
2. With physical guesses, access depends on their accuracy:
Bitmap Indexes on Index-Organized Tables
With heap-organized tables, the database uses the physical rowid to access the base table.
Figure 3-4 Bitmap Index on Index-Organized Table
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
Heap-Organized table 和 Index-Organized table 说明相关推荐
- 索引组织表(index organized table, IOT)
1.索引组织表 索引组织表(index organized table, IOT)就是存储在一个索引结构中的表.存储在堆中的表是无组织的(也就是说,只要有可用的空间,数据可以放在任何地方),IOT中的 ...
- oracle索引组织表(Index Organizied Table)
索引组织表(index organized table, IOT)就是存储在一个索引结构中的表.存储在堆中的表是无组织的(也就是说,只要有可用的空间,数据可以放在任何地方),IOT中的数据则按主键存储 ...
- PLSQL中INDEX BY TABLE 的 prior 和 next 操作学习
开始 --INDEX BY Table SET SERVEROUTPUT ON;DECLARETYPE enm_tab_type IS TABLE OFemp.ename%TYPEINDEX BY B ...
- mysql建立索引的优缺点|创建索引alter或create索引分类(PRIMARY KEY,UNIQUE KEY,FULLTEXT,INDEX)作用查看索引show index from table
建立索引的优缺点: 为什么要创建索引呢? 这是因为,创建索引可以大大提高系统的性能. 第一.通过创建唯一性索引,可以保证数据库表中每一行数据的唯一性. 第二.可以大 ...
- Bootstrap table方法,Bootstrap table事件,配置
调用 BootStrap Table 方法的语法: $('#table').bootstrapTable('method', parameter); 例如: $('#my_table').bootst ...
- layui table 添加img_layui中table表格的基本操作
最近抽空总结了下layui中table表格的相关配置,解释的比较全面,可供大家参考,页面效果如下: table表格.png table表格html部分: 新增 备注 编辑 table表格渲染js (包 ...
- 1.18.2.5.Table APISQL(查询表、Table API、SQL、混用Table API和SQL、输出表、翻译与执行查询、Blink planner、Old planner)等
1.18.2.5.查询表 1.18.2.5.1.Table API 1.18.2.5.2.SQL 1.18.2.5.3.混用Table API和SQL 1.18.2.6.输出表 1.18.2.7.翻译 ...
- MySQL create table as与create table like对比
对于mysql的复制相同表结构方法,有create table as 和create table like 两种,区别是什么呢? create table t2 as select * from t1 ...
- android studio table居中代码_html table表格标签内容如何居中显示?表格的align属性的用法介绍...
本篇文章主要的介绍了关于HTML 表格table标签的居中使用,还有关于align属性在table表格标签中的使用方法,可以帮助表格对齐和表格中的文本对齐.接下来让我们来看看这篇文章吧. 首先我们先来 ...
- mysql table as_Mysql中create table as与like命令的区别
MySQL 是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性.MySQL 所使用的 SQL 语言是用于访问数据库的最常用标准 ...
最新文章
- Acwing第 2 场周赛【完结】
- windows下启动/关闭Sybase数据库服务器
- 实验4-1-10 兔子繁衍问题 (15分)
- android view超出屏幕_Android APP界面保持屏幕常亮方法
- 将一个列表的奇数列赋值到另外一个列表
- python 协程 php,python3.x,协程_python协程练习部分代码的理解?,python3.x,协程,asyncio - phpStudy...
- 阿里内部平台VS火山引擎后端开发,拿头比?
- linux文件权限中 chmod、u+x、u、r、w、x分别代表什么
- 从零开始react实战:云书签-1 react环境搭建
- 使用OBS做无延时/低延迟直播(实测)
- android屏幕适配无效_Android 屏幕适配终结者
- 图表控件ScottPlot
- office2013卸载工具
- 解决node环境下SyntaxError: Cannot use import statement outside a module的问题
- cocos2d 简单消除游戏算法 (一)
- HTML5网页设计图片如何,网页设计中优化图片的6个技巧
- Memcached命名空间
- 模型推荐丨政务大数据项目案例模型分享
- 一个SQL获取某股票连续上涨的天数
- WMS、WFS、WCS、WPS、WMTS、TMS、WMSC等常见地图服务的区别
热门文章
- 421 Maximum login limit has been reached. on hdfs-over-ftp
- 好物推荐|预算1500元适合弹唱和指弹初学者入门单板吉他!
- Python-将一个英文文本文件中的大写字母变成小写字母,小写字母变成大写字母
- 前端工具webpack-基础使用第2篇
- wifi连接不成功提示有限的访问权限,更改适配器设置来解决
- 超实用迷你js判断类库介绍
- 鼠标在滑块上滚轮控制_高速直线运动导轨—CUBIC滚轮直线导轨
- Cisco ASA 5505 密码重置 配置重置
- 教你用这个技巧问薪资,HR不反感!
- 基于AI绘画的换脸教学(初级)