Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Order of Transactions
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 - 05:47:10 CDT