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
ROWIDto ensure uniqueness across all elements. -
ROWIDis 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
ROWIDvalues. 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 usingROWIDbased access, TimesTen Scaleout returns the value of theROWIDin the first data space. -
Applications should not store
ROWIDvalues and try to use these values later. -
ROWIDvalues may change if the location of the data changes (through data redistribution).For information on the
ttGridAdmin dbDistributecommand, 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
ROWIDdata type.
In TimesTen Classic:
-
You can examine a rowid by querying the
ROWIDpseudocolumn. -
The
ROWIDis a pseudocolumn (not an actual column) and thus does not require database space. You cannot update, index, or dropROWID. -
The
ROWIDvalue persists throughout the life of the table row. -
ROWIDvalues persist through recovery, backup and restore operations. However copies of rows that are created as a result of replication or as a result of runningttMigrateto migrate rows out of the database and then back into the database or runningttBulkCpto copy rows out of the database and then back into the database have differentROWIDvalues 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.