SET SESSION RUNTIMECAP
Sets the maximum amount of time queries can run in a give session. If a query exceeds its session's RUNTIMECAP setting, Vertica terminates the query and returns an error. You cannot increase the RUNTIMECAP beyond the limit that is set in your user profile.
Note: Vertica does not strictly enforce session RUNTIMECAP settings. If you time a query, you might discover that it runs longer than the RUNTIMECAP setting.
Syntax
SET SESSION RUNTIMECAP duration
Parameters
| duration |
Specifies how long a given query can run in the current session, one of the following:
|
Privileges
- Superusers can increase session
RUNTIMECAPto any value. - Non-superusers can only set the session
RUNTIMECAPto a value equal to or lower than their own userRUNTIMECAP.
Examples
Set the maximum query runtime for the current session to 10 minutes:
=> SET SESSION RUNTIMECAP '10 minutes';
Revert the session RUNTIMECAP to your user default setting:
=> SET SESSION RUNTIMECAP =DEFAULT;
SET
=> SHOW RUNTIMECAP;
name | setting
------------+-----------
runtimecap | UNLIMITED
(1 row)