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

Home -> Community -> Usenet -> c.d.o.server -> Re: Order of Transactions

Re: Order of Transactions

From: Matthew MacFarland <matthew_macfarland_at_dril-quip.com>
Date: Thu, 8 Oct 1998 09:58:11 -0500
Message-ID: <6vijt4$7u6$1@uuneo.neosoft.com>


Hello Tornyi,

Thank you for your reply. I had the wrong impression of how the sequences worked with multiple users. I thought that if UserA called the sequence and got 100 his nextval would be 101. If UserB called the sequence after that he would get 102 and his nextval would be 103.

If I add the Order clause would UserB get 101 and nextval 102 and cause UserA's nextval to become 103?

Thanks,

Matthew

Tornyi Lajos wrote in message <361C982E.A1281443_at_alpha-consulting.hu>...
>Hi,
>Are you using Parallel Server? If not than the sequence numbers are
>guaranteed to be generated in the order they were requested. If you're
>using Parallel Server then create the sequence with the order option
>(see the manuals for create sequence). I think that implementing your
>own number-generator could be much more headache (what if two
>transactions read the same value from the generator table at the same
>time, increment it and update the table - it can be solved, but...).
>
>Matthew MacFarland wrote:
>>
>> Hello everyone,
>>
>> I am trying to find a good way to determine the order in which rows in
>> specific tables are inserted, updated, and deleted. I started with and
>> Oracle sequence but found that the order of the sequence number assigned
to
>> my log table by triggers does not always match the order that the rows
got
>> committed. I was thinking of replacing the Oracle sequence with my own
>> version that reads a number from a table adds one and updates the number
for
>> next time. Since all users share the same table and the trigger code
that
>> reads and updates the number is in the same transaction this should yield
>> truly sequential number assignment for the log. Seems like some
performance
>> problems could result from doing this.
>>
>> Has anyone had a similar problem? How did you solve it?
>>
>> Thanks,
>>
>> Matthew MacFarland
>> Dril-Quip, Inc.
>> matthew_macfarland_at_dril-quip.com
Received on Thu Oct 08 1998 - 09:58:11 CDT

Original text of this message

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