oralce physical rowid structure
October 15, 2008 2 Comments
Since Oracle 8i, oracle physical rowid is in extended rowid format. Extended rowids show in 18 characters with base 64 encoding. The encoding characters are A-Z, a-z, 0-9, +, and /. It is stored in 10 bytes (80 bits).
An extended rowid has a four-piece format, OOOOOOFFFBBBBBBRRR:
The first 6 characters OOOOOO represent data object number, using 32bits
The next 3 characters FFF represent tablespace-relative datafile number, using 10bits.
The next 6 characters BBBBB represent block number, using 22bits.
The last 3 character RRR represent row number, using 16bit
18characters=6+3+6+3
80bits=32+10+22+16
It will easy to understand below.
32bit—object number——–The maximum number of OBJECT in one database is 4G (4294967296)
10bit—file number—–The maximum number of FILE in a tablespace is 1022 (keep 2 in remainder)
22bit—block number——–The maximum number of BLOCK in one file is : 4M (4194304)
16bit—row number——– The maximum number of ROW in one block is 64K(65536)
this is an informative post…great job
It really helped me to understand the basic idea….great