Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide

Calculating the number of locks

To calculate the number of locks needed, estimate the following parameters:

Note –

Locks are held for both primary records and hot-standby records. Hence, for insert, update and delete operations a transaction will need twice as many locks as the number of records. Read operations need locks only on the primary records. During refragmentation and creation of secondary indices, log records for the involved table are also sent to the fragment replicas being created. In that case, a transaction needs four times as many locks as the number of involved records. (Assuming all queries are for the affected table.)