Ways to Avoid Lock Delays
To prevent delays due to lock waits, there are several approaches:
- Keep transactions as short as possible. Use set autocommit on if possible.
- Set the "readlock = nolock" lockmode when possible, to avoid waiting for shared locks.
- Use the set lockmode parameter timeout to indicate how long to wait for a lock. The default is to wait forever. If the timeout is reached, an error is returned and the current statement (not the transaction) is aborted. You must check for this error in your application code.
For details on the set lockmode statement, see User-Controlled Locking.
© 2007 Ingres Corporation.
All rights reserved.