Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Serious article on comparison between MS SQL Server 2005 Yukon and Oracle 10g
DA Morgan wrote:
> Jonathan Leffler wrote:
> > A "transitory" latch is still serialization. That is substantially > different than a cached sequence.
I beg to differ, but since we seem to be defining the same word (serialization) in different ways, maybe it is best to leave this as "there are different views on this". OTOH, I'll try to explain again what I mean. [Come to think of it, maybe the nomenclature problem is the distinction between a lock and a latch - they are different in IDS. Roughly speaking, a lock is a heavyweight object intended to coordinate access by transactions in separate sessions to parts of the database that are logically stored on disk. A latch is a lightweight concurrency control mechanism to coordinate access to a piece of memory by separate CPUs.]
The SERIAL column is no more serialized than a cached sequence - both generate a new set of values (an IDS SERIAL column generates a set with one value; a cached sequence a set with a configurable number of values) ensuring that no other process interferes with the process of generating that set of values but not otherwise holding up concurrent processes using the same generator. (Or are you going to tell me that Oracle does not ensure that multiple concurrent sessions on a multi-CPU machine all get different sets of cached values and that the same sequence number from a single sequence could, therefore, be issued to multiple sessions?) In IDS, the serial value counter is not locked - it is latched to ensure that only single process accesses it while the value is being generated, but the latch is released as soon as the value has been correctly generated (and the same generator may be used many times by both the same session and by other sessions before the transaction in the first session terminates, whether that's with a COMMIT or ROLLBACK). Serial values are never reissued (barring wraparound to one after the maximum value is generated); once the increment has occurred, it stays incremented.
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/Received on Tue Nov 23 2004 - 02:01:54 CST
![]() |
![]() |