Resource Governor
Resource Governor helps to manage server workload and resources by specifying limits for resource usage per user or query.
To ensure efficient resource usage and balanced system performance, the following limitations can be applied to user accounts:
maximum number of concurrent queries a user can execute;
maximum time allowed for a query to run;
maximum number of rows that a query can return.
If any of the limits are exceeded by a request, it will be terminated by the system with an error message indicating which limit was reached.
The limitations are set per user, not per role.
Configuring Limitations for a New User
To set limitations for a new user, use the SYSADMIN.addUser procedure and set the parameters concurrentQueries
, maxRows
, and maxQueryTime
.
Adjusting Limitations for an Existing User
To change the limitations for an existing user, use the SYSADMIN.setUserLimits procedure. Please note that in this case, the limits will only impact queries that are started after the new limits have been applied.
Default Query Limits
In both SYSADMIN.addUser and SYSADMIN.setUserLimits, the default limits are set as follows:
Property name | Description | Default |
---|---|---|
| The maximum number of concurrent queries. Set to -1 for unlimited queries | -1 |
| Maximum query execution time in minutes. Set to -1 for unlimited execution time | -1 |
| Maximum number of rows the user can retrieve in one query. Set to -1 for unlimited number of rows | -1 |
Query limits available since v4.8