FAQ: Is the assumption that ObjectID is always larger than the last inserted ObjectID correct?
Is the assumption that ObjectID is always larger than the last inserted ObjectID correct?
No, this is not an assumption that should be made with respect to ArcSDE maintained ObjectIDs and how they are assigned to newly inserted records; however, the SDE maintained ObjectIDs are guaranteed to be unique.
To reduce network traffic between clients and the SDE server, ObjectIDs are assigned to clients in batches. Clients may or may not exhaust the assigned ObjectIDs. When a client application exits, the unused ObjectIDs are returned to the server. At this point, breaks or gaps may be observed in the numbering sequence of the ObjectIDs in the table or feature class.
The use of Oracle dbms_pipes can result in previously returned or unused ObjectIDs being assigned when any client, running in the same Oracle instance, subsequently requests ObjectID(s). At this point, gaps in the ObjectIDs are 'filled in'.
It is recommended to not have programming logic that relies on ObjectID values being generated sequentially, such as always increasing from the last used value, for newly added records.
- Preserve Oracle pipes, such as ArcSDE row_id values, when shutting down an Oracle instance
- ArcGIS Forums: SDE Sequences and ObjectID thread