ITPub博客

首页 > 应用开发 > IT综合 > Extended Rowids

Extended Rowids

原创 IT综合 作者:tsinglee 时间:2007-11-22 14:07:57 0 删除 编辑

Extended 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.
You can retrieve the data object number from data dictionary views USER_OBJECTS, DBA_OBJECTS, and
ALL_OBJECTS. For example, the following query returns the data object number for the employees table
in the SCOTT schema:

SELECT DATA_OBJECT_ID FROM DBA_OBJECTS
WHERE OWNER = 'SCOTT' AND OBJECT_NAME = 'EMPLOYEES';

You can also use the DBMS_ROWID package to extract information from an extended rowid or to convert
a rowid from extended format to restricted format (or vice versa).

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-983294/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Physical Rowids
下一篇: Restricted Rowids
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1898069