▪SET IDLE TIMEOUT sets the connection-specific maximum timeout in seconds. The setting is effective until a new timeout is given. If the timeout is set to DEFAULT, it means no maximum time.
▪SET LOCK TIMEOUT sets the time in seconds that the engine waits for a lock to be released.
The SET LOCK TIMEOUT statement applies to tables used with the pessimistic concurrency control mode.
By default, lock timeout is 30 seconds. The maximum lock timeout is 1000 seconds; SET LOCK TIMEOUT of more than 1000 seconds fails.
SET LOCK TIMEOUT does not change the timeout for those tables for which the table-level timeout has been set with LOCK TABLE WAIT.
▪SET OPTIMISTIC LOCK TIMEOUT sets the timeout for the row locks acquired with the SELECT FOR UPDATE statement in the optimistic concurrency control mode. The timeout affects only other SELECT FOR UPDATE statements competing for the same table rows. By default, the timeout is zero (no waiting).
By default, the timeout is defined in seconds. The lock timeout can be set at millisecond granularity by adding "MS" after the value, for example:
SET LOCK TIMEOUT 500MS; SET LOCK TIMEOUT 1500 MS;
Tip: Spacing of the "MS" is not significant, and you may use upper or lower case. Without the "MS", the lock timeout will be in seconds.
When the timeout interval is reached, solidDB® terminates the timed-out statement. For more information, see Setting lock timeout.