Aaron Mulder writes:
> On Wed, 18 Oct 2000, Rickard Oberg wrote:
> > > 3) How do we avoid clashing with keys generated by the DB itself or other
> > > software?
> >
> > By allowing the initial counter to be given. If you already have a bunch of
> > keys in the db then simply set the initial one to a number higher than
> > what's already created.
>
> I disagree. I don't think we should assume that jBoss is the only
> user of the database. In general, I think we have to assume that other
> apps may be updating at the same time, and even triggers within the DB and
> so on.
> Now, with a compliant DB, we can fetch a number of values all in a
> row instead of one at a time as requests come in, but I don't think that
> really buys you anything. In that case, we're not getting a range, just
> calling "nextval" 10 times in a row.
> Ah - perhaps you were just talking about the non-compliant DB,
> where we have to fake it by writing our own table or something. In that
> case, then you could certainly grab a bunch of IDs at once by just upping
> the "last value" by 10.
But why not just use the DB value for half of the key? True, as
Rickard pointed out, you lose some of your key space on server stop,
but that is not so drastic...
Tom
--
Tom Cook - Software Operations
"We rarely find that people have good sense unless they agree
with us."
- Francois, Duc de la Rochefoucauld
LISAsoft Pty Ltd - www.lisa.com.au
--------------------------------------------------
38 Greenhill Rd. Level 3, 228 Pitt Street
Wayville, SA, 5034 Sydney, NSW, 2000
Phone: +61 8 8272 1555 Phone: +61 2 9283 0877
Fax: +61 8 8271 1199 Fax: +61 2 9283 0866
--------------------------------------------------
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]