Re: Stupidity or sequences?
From: David Fitzjarrell <oratune_at_yahoo.com>
Date: Fri, 12 Apr 2013 08:47:04 -0700 (PDT)
Message-ID: <1365781624.33538.YahooMailNeo_at_web121602.mail.ne1.yahoo.com>
No, for various reasons. You mentioned load, and that's an issue, then there's the concurrency problem, and the fact that a 'roll your own sequence number generator' usually relies on the current MAX() of the column in question which cannot be determined when uncommitted inserts are in play. I talked about some of this a good while back:
http://dfitzjarrell.wordpress.com/2008/06/06/out-of-sequence/
It's still a pretty good read, though. :) David Fitzjarrell
From: Johan Eriksson <valpis_at_gmail.com> To: Oracle Discussion List <oracle-l_at_freelists.org> Sent: Friday, April 12, 2013 9:24 AM
Subject: Stupidity or sequences?
Date: Fri, 12 Apr 2013 08:47:04 -0700 (PDT)
Message-ID: <1365781624.33538.YahooMailNeo_at_web121602.mail.ne1.yahoo.com>
No, for various reasons. You mentioned load, and that's an issue, then there's the concurrency problem, and the fact that a 'roll your own sequence number generator' usually relies on the current MAX() of the column in question which cannot be determined when uncommitted inserts are in play. I talked about some of this a good while back:
http://dfitzjarrell.wordpress.com/2008/06/06/out-of-sequence/
It's still a pretty good read, though. :) David Fitzjarrell
From: Johan Eriksson <valpis_at_gmail.com> To: Oracle Discussion List <oracle-l_at_freelists.org> Sent: Friday, April 12, 2013 9:24 AM
Subject: Stupidity or sequences?
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-lReceived on Fri Apr 12 2013 - 17:47:04 CEST