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?

Back to index of questions


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


Back to top

Back to index of questions