Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Sequences in OPS/RAC

Re: Sequences in OPS/RAC

From: Tim Gorman <tim_at_sagelogix.com>
Date: Mon, 03 Nov 2003 07:59:33 -0800
Message-ID: <F001.005D5748.20031103075933@fatcity.com>


Sequences are mastered by the single SYS.SEQ$ table in each database. Cached or uncached, RAC or non-RAC, OPS or non-OPS, sequence numbers generated by this mechanism are unique across a database, not by instance. Each instance updates SEQ$ as individual numbers (noncached) or ranges of numbers (cached) are "reserved", and those updates are controlled by the same synchronization mechanisms used by OPS/RAC for all UPDATE statements. This is precisely the reason that setting CACHE on sequence numbers help performance, as the number of updates to SEQ$ are reduced, minimizing the bottleneck.

However, because of the simplicity of this caching mechanism, sequence numbers are not guaranteed to be in order (i.e. sequentially ascending) across multiple instances.

Perhaps Mr. Stephens mis-spoke, confusing uniqueness for ordering? Or perhaps he is confusing "distributed databases" for "clustered databases"?

>
>
> I have always been comfortable with the idea that
> Sequences continue to guarantee
> uniqueness even in OPS / RAC environments.
>
> However, a recent Builder.Com article by Scott Stephens on
> the SYS_GUID function has these lines :
> "Sequence generator numbers are guaranteed to be unique
> only for a single instance, which is unsuitable for use
> as a primary key in parallel or remote environments,
> where a sequence in each environment might generate the
> same number and result in conflicts. An identifier created
> by SYS_GUID is guaranteed to be unique for each
> database."
> Huh ?! Do the lines mean that a single sequence can have
> duplicate values in the two instances of an RAC cluster ?
>
>
> Hemant K Chitale
> Oracle 9i Database Administrator Certified Professional
> My personal web site is : http://hkchital.tripod.com
>
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.net --
> Author: Hemant K Chitale
> INET: hkchital_at_singnet.com.sg
>
> Fat City Network Services -- 858-538-5051
> http://www.fatcity.com San Diego, California --
> Mailing list and web hosting services
> ----------------------------------------------------------
> ----------- To REMOVE yourself from this mailing list,
> send an E-Mail message to: ListGuru_at_fatcity.com (note
> EXACT spelling of 'ListGuru') and in the message BODY,
> include a line containing: UNSUB ORACLE-L (or the name of
> mailing list you want to be removed from). You may also
> send the HELP command for other information (like
> subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Gorman
  INET: tim_at_sagelogix.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Nov 03 2003 - 09:59:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US