Comparison of Logical Rowids with Physical Rowids

tsinglee發表於2007-11-22

Logical rowids are similar to the physical rowids in the following ways:

Logical rowids are accessible through the ROWID pseudocolumn.

You can use the ROWID pseudocolumn to select logical rowids from an index-organized table. The
SELECT ROWID statement returns an opaque structure, which internally consists of the table's primary
key and the physical guess (if any) for the row, along with some control information.

You can access a row using predicates of the form WHERE ROWID = value, where value is the opaque
structure returned by SELECT ROWID.

Access through the logical rowid is the fastest way to get to a specific row, although it can
require more than one block access.
A row's logical rowid does not change as long as the primary key value does not change. This is less
stable than the physical rowid, which stays immutable through all updates to the row.
Logical rowids can be stored in a column of the UROWID datatype
One difference between physical and logical rowids is that logical rowids cannot be used to see how
a table is organized.

Note:
An opaque type is one whose internal structure is not known to the database. The database provides
storage for the type. The type designer can provide access to the contents of the type by
implementing functions, typically 3GL routines.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-983302/,如需轉載,請註明出處,否則將追究法律責任。

相關文章