Working with Sequences

Database sequences are useful for generating numbers that grow or increase sequentially in an order that is configurable. Application designers need not use “home-grown” sequence generators using a database table and update it using local logic. Such sequences are not very scalable, especially in Oracle RAC environments with high inserts, when they are used with specific clauses. Yet, in certain cases, these customized and non-Oracle sequences are the only way to achieve certain goals that cannot be achieved using Oracle’s own sequences.

A select from a sequence is an update to the data dictionary when it is not cached. So every select internally invokes a DML and commit, which is expensive in Oracle RAC, because system ...

Get Oracle Database 11g Oracle Real Application Clusters Handbook, 2nd Edition, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.