db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deb Rogind" <deb...@rogind.com>
Subject ID Broker id maintenance
Date Thu, 13 Feb 2003 19:46:49 GMT

I have a web application running under tomcat which uses torque, velocity
and mysql db. I am using the defaultIdMethod = "idbroker", not "native", so
rely on ID broker to furnish primary key indices. When inserting members
into a table from a different thread, the next_id of id_table (ID Broker is
being used, not the native autoincrement feature of mysql)  skips large
blocks of numbers. The indices are getting increasingly (almost alarmingly)
large. What are the implications of this behavior of ID broker over time? I
am thinking of regenerating the entire database to use "native" and then
repopulating it.  Do you think this is necessary / worth the effort?

Please refer to this link:
http://www.developer.com/java/article.php/1457081 , excerpt:

The defaultIdMethod parameter tells Torque how to handle integer primary key
columns. If "native" is selected, Torque will allow the underlying database
to use its own native implementation. If "idBroker" is specified, Torque
will use its own vendor-neutral implementation which will work even for
databases that don't support auto-incrementing primary keys. The downside to
using the ID Broker is that it forces Torque to do a lot of acrobatics to
keep the ids in sync between multiple threads or processes (or even
servers), something that the native database implementations can usually
handle better.

Thanks for your help,
Debbie Rogind

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message