Creating and tuning database tables  Concurrency control options

Chapter 4: EJB CMP Tuning

Automatic key generation settings

EAServer supports several mechanisms for automatic key generation, described in “Enabling automatic key generation” in Chapter 27, “Creating Entity Components,” in the EAServer Programmer’s Guide.

If your component uses the Adaptive Server Enterprise with the Sybase identity column type, make sure the relevant database and table options are tuned, such as the identity burning set factor database option or the identity_gap table creation parameter.

If your component uses automatic key generation with a key-lookup table, tune the key-use-rate setting described in “Configuring key generation to use a key lookup table” in the EAServer Programmer’s Guide. To prevent different threads from creating duplicate keys, EAServer uses a semaphore to synchronize the key increment operation. Each thread reserves key_use_rate key values per increment. The key use rate can be tuned to reduce inter-thread contention for locks on the key table. The default of 100 results in good performance for most applications. Very large values can result in large gaps between key values. Gaps in the key sequence are possible if the key use rate is greater than 1.

Copyright © 2005. Sybase Inc. All rights reserved. Concurrency control options