Kbase P58968: Are table record ROWIDs and RECIDs unique?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/02/2011 |
|
Status: Verified
GOAL:
Are table record ROWIDs and RECIDs unique?
GOAL:
What is the scope of ROWIDs and RECIDs uniqueness? Is it the whole database or one storage area?
GOAL:
Is RECID unique across tables or storage areas?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
Starting with Progress version 9.x, table record ROWIDs and RECIDs are unique per storage areas. They are not unique across the entire database. Consequently, two different records from two different tables residing in two different storage areas may very well have the same ROWIDs and RECIDs values.
RECIDs / ROWIDs encode the on-disk location of a table record within a given storage area. They specify the data block of the record in that storage area as well as the record's specific location within that block. The RECID / ROWID of a record is determined by database the space allocator. The RECID / ROWID remains constant for the life of a record. That means:
* Once a record is created, its RECID / ROWID does not change when it is updated.
* When a record is deleted, some other record with the same RECID / ROWID may be created in its place.
* When a record is deleted and is created it again (i.e. a new record with the exact same data values), the new record will most likely have a different RECID / ROWID.
Other comments:
If you dump all the records, delete them, and load the dumped records into the same database, they will have new different RECIDs / ROWIDs.
If you dump and load into a different database or a new database, the new RECIDs / ROWIDs will be different.
If a table is moved, its RECIDs / ROWIDs will change as records are created in the new location deleted from the old. Index entries will change to reflect the new RECIDs / ROWIDs .
If you copy a database with procopy, prodb, or by copying the extents, then RECIDs / ROWIDs do not change.
If you make a backup of a database and then restore the backup, then RECIDs / ROWIDs do not change.
If you try to predict the RECID / ROWID of a new record, you will generally be wrong.
Making any assumptions about the order in which RECIDs / ROWIDs are assigned is wrong. They are not assigned in ascending order even though it may appear that way sometimes.