Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Database Access : Sequences : Choosing between sequences and control tables : Performance versus capabilities
 
Performance versus capabilities
In general, sequences provide a much faster and more automated mechanism to generate sequential values than control tables. Sequences are faster because their values are all stored together in a single, table-independent, database block, and they do not participate in transactions. As a result, the principal limitations of sequences for certain applications include:
*Because of transaction independence, sequences do not roll back when transactions are undone, but maintain their last value for all UNDOs. However, fields defined in control tables do roll back to their pretransaction values, as long as all updates to control tables respect transaction boundaries.
*The number of unique sequences supported by a database varies according to the database block size; whereas the number of fields in a control table is limited by the table size.