- 最后登录
- 2016-4-13
- 在线时间
- 49 小时
- 威望
- 65
- 金钱
- 751
- 注册时间
- 2012-3-13
- 阅读权限
- 50
- 帖子
- 95
- 精华
- 1
- 积分
- 65
- UID
- 293
|
1#
发表于 2012-6-26 21:35:42
|
查看: 3779 |
回复: 1
http://www.cnblogs.com/spring3mvc/archive/2009/12/16/2414939.html
文中写到
ROWID 格式:
扩展的ROWID 在磁盘上需要10 个字节的存储空间,并使用18 个字符来显示。
它包含下列组成元素:
1. 数据对象编号:每个数据对象(如表或索引)在创建时都分配有此编号,并且此编号在数据库中是唯一的
2. 相关文件编号:此编号对于表空间中的每个数据文件是唯一的
3. 块编号:表示包含此行的块在数据文件中的位置
4. 行编号:标识块头中行目录位置的位置
在内部,存储的10个字节(bytes),即80位(bit)又按如下规则进行划分:
(1)数据对象编号需要32 bit
(2)相关文件编号需要10 bit
(3)块编号需要22 bit
(4)行编号需要16 bit
请问这个
“
扩展的ROWID 在磁盘上需要10 个字节的存储空间,并使用18 个字符来显示
”
是如何推导出来的,还是设计就是如此,
但是我在Oracle官方文档上没有看到有这个说明啊?
我看到的只是
Extended RowidsExtended rowids use a base 64 encoding of the physical address for each row selected. The encoding characters are A-Z, a-z, 0-9, +, and /. For example, the following query:
SELECT ROWID, last_name FROM employees WHERE department_id = 20; can return the following row information:
ROWID LAST_NAME ------------------ ---------- AAAAaoAATAAABrXAAA BORTINS AAAAaoAATAAABrXAAE RUGGLES AAAAaoAATAAABrXAAG CHEN AAAAaoAATAAABrXAAN BLUMBERG An extended rowid has a four-piece format, OOOOOOFFFBBBBBBRRR:
OOOOOO: The data object number that identifies the database segment (AAAAao in the example). Schema objects in the same segment, such as a cluster of tables, have the same data object number. FFF: The tablespace-relative datafile number of the datafile that contains the row (file AAT in the example). BBBBBB: The data block that contains the row (block AAABrX in the example). Block numbers are relative to their datafile, not tablespace. Therefore, two rows with identical block numbers could reside in two different datafiles of the same tablespace. - RRR: The row in the block.
|
|