solidDB Help : solidDB reference : SQL: Statements : SET : SET ... TIMEOUT
  
SET ... TIMEOUT
SET IDLE TIMEOUT {timeout‑in‑seconds | timout‑in‑milliseconds MS | DEFAULT}
SET LOCK TIMEOUT {timeout‑in‑seconds | timeout‑in‑milliseconds MS}
SET OPTIMISTIC LOCK TIMEOUT {timeout‑in‑seconds | timeout‑in‑milliseconds MS}
Access requirements
Database user
Usage
Use the SET IDLE TIMEOUT statement to set the connection-specific maximum timeout in seconds. The setting is effective until a new timeout is given. If the timeout is set to DEFAULT, there is no maximum time.
Use the SET LOCK TIMEOUT statement to set the time in seconds that the engine waits for a lock to be released.
The SET LOCK TIMEOUT statement applies to tables that are used with the pessimistic concurrency control mode.
By default, lock timeout is 30 seconds. The maximum lock timeout is 1000 seconds; a 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.
Use the SET OPTIMISTIC LOCK TIMEOUT statement to set 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;
When the timeout interval is reached, solidDB terminates the timed-out statement. For more information, see Modifying lock timeouts.
The SET ... TIMEOUT statements take effect immediately, starting from the next SQL statement.
Examples
SET IDLE TIMEOUT 30;
SET OPTIMISTIC LOCK TIMEOUT 30;
SET LOCK TIMEOUT 30;
SET LOCK TIMEOUT 500MS;
Go up to
SET