oralce physical rowid structure

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)

About these ads

About Alex Zeng
I would be very happy if this blog can help you. I appreciate every honest comments. Please forgive me if I'm too busy to reply your comments in time.

2 Responses to oralce physical rowid structure

  1. neworacledba says:

    this is an informative post…great job

  2. Abdul Rahman says:

    It really helped me to understand the basic idea….great

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: