What are the uses of key value locking in Informix?

Questions by nancyphilips   answers by nancyphilips

Showing Answers 1 - 1 of 1 Answers

The database server uses a concept called key-value locking to lock the deleted row. When the database server deletes a row, key values in the indexes for the table are not removed immediately. Instead, each key value is marked as deleted, and a lock is placed on the key value. One of the most important uses for key-value locking is to assure that a unique key remains unique through the end of the transaction that deleted it.

Without this protection mechanism, user A might delete a unique key within a transaction, and user B might insert a row with the same key before the transaction commits. This scenario makes rollback by user A impossible. Key-value locking prevents user B from inserting the row until the end of user A's transaction.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions