Understand the meaning of Oracle's Rowid
Note: Here O, represent data_object_id, is associated with the segment of a physical storage location information, so data_object_id + rfile # will eventually navigate to the rowid in that set the physical data files.
If we query a table of ROWID, to get object information, file information, block information and line information, etc., such as blocks of information according to which, you know that the table occupies exactly how many blocks, each block on which line Which data file.
With examples of what Rowid composed of:
SQL> select rowid from emp where rownum = 1;
AAAAeNAADAAAAWZAAA
Decomposition of what we can see
Data Object number = AAAAeN
File = AAD
Block = AAAAWZ
ROW = AAA
In addition, we need to note that, ROWID is 64 hexadecimal, and Distribution in the following
AZ <==> 0 - 25 (26)
az <==> 26 - 51 (26)
0-9 <==> 52 - 61 (10)
+ / <==> 62 - 63 (2)
Take one of the Data Object number = AAAAeN as an example,
N is 64 hex in the 13 position 0
13 * (64 ^ 0) = 13
E is the band of 64 to 30, position 1
30 * (64 ^ 1) = 1920
A band of 0 64
Therefore A * (64 ^ 2) = 0
A * (64 ^ 3) = 0
A * (64 ^ 4) = 0
A * (64 ^ 5) = 0
There AAAAeN = 0 + 0 + 0 + 0 + 1920 + 13 = 1933, said the bank existing object, the object number corresponding to 1933.
Moreover, we can use oracle supplied package, dbms_rowid to do this:
Code :
select dbms_rowid.rowid_object('AAAAeNAADAAAAWZAAA') data_object_id#,
dbms_rowid.rowid_relative_fno('AAAAeNAADAAAAWZAAA') rfile#,
dbms_rowid.rowid_block_number('AAAAeNAADAAAAWZAAA') block#,
dbms_rowid.rowid_row_number('AAAAeNAADAAAAWZAAA') row# from dual;
DATA_OBJECT_ID# RFILE# BLOCK# ROW#
--------------- ---------- ---------- ----------
1933 3 1433 0
.
For more dbms_rowid usage, can refer to the package or the oracle manuals.
Related Posts of Understand the meaning of Oracle's Rowid
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
SQL optimization (1) - full table scan and index the test
Test Objective: To test CBO and RBO, as well as full table scan than index the situation quickly. 1. To create a test environment SQL> select * from v $ version; BANNER -------------------------------------------------- -------------- Oracle Datab ...
-
Dbms_obfuscation_toolkit use of Oracle's encryption and decryption of data (to)
In order to protect sensitive data, oracle start from 8i to provide a data encryption package: dbms_obfuscation_toolkit. Take advantage of this package, our data can be DES, Triple DES or MD5 encryption. This article on the use of this and the use of ...
-
Oracle XDB relax resolve port conflict of 8080
In this paper, carried: http://www.enet.com.cn/article/2008/0306/A20080306175452.shtml Oracle 9i from the start, Oracle includes the installation of the default XDB. After starting the database, Oracle XDB's http service will automatically take u ...
-
Oracle in the relationship between User and Schema
If we want to know the database and the User What is the relationship between Schema, we must first know about User and Schema database What is the concept in the end. In SQL Server2000 in architecture because of the reason, User and Schema there is ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply