View Single Post

   
  #10 (permalink)  
Old 04-20-2008, 07:15 AM
DA Morgan
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

Serge Rielau wrote:
> DA Morgan wrote:
>
>> Serge Rielau wrote:
>>
>>> Sidenote: SEQUENCE is "dirty read" by definition and it is quite
>>> popular in Oracle :-)
>>>
>>> Cheers
>>> Serge

>>
>>
>>
>> By whose definition? Certainly none I have ever heard.
>>

> The freedom of double-quotes Daniel. Open your mind:
> If you open two connections to Oracle and perform a few NEXTVALs in each
> without cout committing. Then you roll one connections transaction back
> the values are "lost". But the second connection was very well affected
> by the lost values: "Dirty read".
> SEQUENCEs don't no squat about transactions and isolation levels.
> Note that I don't blame anyone. Sequences do exactly what they are
> designed to do, just like a regular dirty read (no double quotes) does
> exactly what it's designed to do.
>
> Cheers
> Serge


I can't wrap my mind around your thought that sequence NEXTVAL in any
way relates to a dirty read. Here's why:

CREATE TABLE mytable (
mycol NUMBER);

CREATE TABLE t (
seqno NUMBER);

INSERT INTO t VALUES (1);
COMMIT;

INSERT INTO mytable
SELECT seqno
FROM t;

ROLLBACK;

UPDATE t
SET seqno = seqno+1;

COMMIT;

Do you see a dirty read? I don't. The fact that a transaction didn't
take place but the sequence number was lost is not a dirty read. So
I just don't get your thinking.

Note: No double quotes.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Reply With Quote