暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

How big, in bytes, is a ROWID ?

2011-01-01
976

The Oracle (tm) Users' Co-Operative FAQ

How big, in bytes, is a ROWID?


Author's name: Allan W. Tham

Author's Email: allanwtham@hotmail.com

Date written: Nov 15 2001

Oracle version(s): 8.1.7.0.0

How big, in bytes, is a ROWID?


There are three formats of ROWIDs.

   1. Short or Restricted
   2. Long or Extended
   3. Universal ROWID

Short or Restricted ROWID is stored as a six-byte hexadecimal string. DBA (4 bytes) + Row (2 bytes). This format is used when the segment that contains the addressed row can be unambiguously determined, for example in row piece pointers, for normal indexes on nonpartitioned tables and for local indexes for partitioned tables. This is the only format used in Oracle 7. The external representation uses 18 characters:BBBBBBBB.RRRR.FFFF (BBBBBBBB: Block, RRRR: Row, FFFF: File). Internal Code = 69

Long or Extended ROWID is stored as a ten-byte hexadecimal string. Object ID (4 bytes) + DBA (4 bytes) + Row (2 bytes). Long or Extended ROWID contains the object number, in addition to tablespace-relative DBA, and therefore completely identifies the row. It is used in columns of type ROWID and in global indexes for partitioned tables. This form is used in the user columns of ROWID type. This format was introduced in Oracle 8. The external representation uses 18 characters (too long to elaborate). Internal code = 69.

UROWID is stored as a hexadecimal string of up to 3950 bytes. It represents the logical address of a row in an index-organized table and a foreign table. It has three subtypes; physical, logical(primary-key based) and remote(foreign). The internal code is 208.

Note: DBA is Data Block Address


Further reading:Data Management and Storage Internals



【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论