RE: Stupidity or sequences?
Date: Fri, 12 Apr 2013 17:59:03 +0000
Message-ID: <1E24812FBE5611419EFAFC488D7CCDD1186A109B_at_G6W2491.americas.hpqcorp.net>
One way to try to handle a gapless value requirement might be to use a sequence generator to create a key value used to tie rows of data together in the online process then via batch generate the gapless column value.
For relatively low concurrent access the single row table as a value holder works reasonably well. This can also work under moderate load if the target DML consists of small, short transactions, i.e., update value, insert row, commit.
A heavy hitter insert job needs a sequence.
IMHO many requirements for sequential value are not based on valid business requirements, but are just due to people not liking see missing values in their reports.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of gints.plivna_at_gmail.com
Sent: Friday, April 12, 2013 1:51 PM
To: valpis_at_gmail.com
Cc: Oracle Discussion List
Subject: Re: Stupidity or sequences?
A while ago I wrote an article The curse of gapless sequences http://gplivna.eu/papers/gapless_sequences.htm Gints
On 2013. gada 12. apr., at 18:24, Johan Eriksson <valpis_at_gmail.com> wrote:
> Hi all,
> I think most of us has seen someone trying to be smart or trying to
> gain database independencies by not using oracle sequence but instead
> roll their own system by using a table, and a row for each "sequence".
> Almost every attempt on this I yet have seen has been plagued with row
> lock contention or other concurrencies, scalability zero...
>
> Have anyone actually seen some implementation of this kind work when
> load increase?
>
> /johan
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Fri Apr 12 2013 - 19:59:03 CEST