Lennart Petersson wrote:
> Sound like a fucking stupid dummy question, but what the hell...

> What is having the best performance?
> 1) To let the DB generate next key using some kind of IDENTITY/SEQUENCE function?
> 2) To do like we do today and many others i guess, something like the HIGH/LOW key 
>generator in Castor. We have
> a CMP EB that handle this table.

> Any ideas? Oleg, what have you seen in the Castor work?

> /Lennart

A fucking stupid dummy answer:
IMHO the best performance is with UUID key generator, but it requires
primary key char[30], such keys work slower than numeric ones.
HIGH/LOW key generator has a parameter "grab-size" - how many numbers
to "grab" during one database operation. The more is grab-size the
more is performance, but also more is the average gap in a sequence of
generated keys. With low grab-size it's slower than IDENTITY/SEQUENCE,
with high grab-size it's faster, I don't know the threshold value.
IDENTITY/SEQUENCE key generators have good performance and almost no
gaps, but they are not portable across different RDBMS.
My choice is HIGH/LOW.

Oleg

> Den 2002-01-14 19:11:05 skrev Dain Sundstrom <[EMAIL PROTECTED]>:

>>Cool.  I think we should look at using this post beta.
>>
>>-dain
>>
>>> -----Original Message-----
>>> From: Oleg Nitz [mailto:[EMAIL PROTECTED]]
>>> Sent: Monday, January 14, 2002 10:23 AM
>>> To: Dain Sundstrom
>>> Subject: Re: [JBoss-dev] Autogenerated primary keys etc
>>> 
>>> 
>>> Dain Sundstrom wrote:
>>> > If you want to write the code for the most popular data 
>>> bases, I'll attempt
>>> > to write a plugable engine for it.
>>> The code is already written in Castor and can be easily reused.
>>> There is KeyGenerator interface that can be used independently from
>>> other CastorJDO code.
>>> And the castor.jar is bundled with JBoss 3.0, isn't it?
>>> And Castor KeyGenerators are well tested, don't reinvent the wheel :)
>>> 
>>> Oleg
>>> 
>>> > -dain
>>> 




> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to