ROWID Pseudocolumn
TimesTen assigns a unique id called a rowid to each row stored in a table. This rowid (called a ROWID
pseudocolumn) has data type ROWID
.
In TimesTen Scaleout, the ROWID
pseudocolumn has a different meaning than in TimesTen Classic.
In TimesTen Scaleout:
-
TimesTen Scaleout uses
ROWID
to ensure uniqueness across all elements. -
ROWID
is the identifier of a specific copy of a row. If that copy is not available because the element that has the copy is not available, then you cannot access the row byROWID
. In this case, you should access the row by primary key. -
Each copy of a row has different
ROWID
values. This is true for a duplicate distribution scheme where K-safety is set to 1 and for all tables (no matter what the distribution scheme is) where K-safety is set to 2. In these cases, when usingROWID
based access, TimesTen Scaleout returns the value of theROWID
in the first data space. -
Applications should not store
ROWID
values and try to use these values later. -
ROWID
values may change if the location of the data changes (through data redistribution).For information on the
ttGridAdmin dbDistribute
command, see Set or Modify the Distribution Scheme of a Database (dbDistribute) in the Oracle TimesTen In-Memory Database Reference. -
TimesTen Scaleout does not support the
ROWID
data type.
In TimesTen Classic:
-
You can examine a rowid by querying the
ROWID
pseudocolumn. -
The
ROWID
is a pseudocolumn (not an actual column) and thus does not require database space. You cannot update, index, or dropROWID
. -
The
ROWID
value persists throughout the life of the table row. -
ROWID
values persist through recovery, backup and restore operations. However copies of rows that are created as a result of replication or as a result of runningttMigrate
to migrate rows out of the database and then back into the database or runningttBulkCp
to copy rows out of the database and then back into the database have differentROWID
values than the original rows.
For TimesTen Scaleout, see Understanding ROWID in Data Distribution in Oracle TimesTen In-Memory Database Scaleout User's Guide.
For TimesTen Classic, see Expression Specification for more information on rowids. See ROWID Data Type for more information about the ROWID
data type.