Patent attributes
The present invention relates to a method and a computer program for concurrency control for a secondary index (13) wherein many deadlocks are avoided by means of a selective locking strategy and by means of allowing index records (14) of the secondary index to contain some keys to many but never too few. When keys are read from the secondary index (13) it is thus possible to read some keys that may be irrelevant. However, such irrelevant keys are sorted out by means of checking against the corresponding records (12) in the table (11) to which the secondary index (13) is associated. The selective locking strategy allows for increased concurrency.