devxlogo

Using the Query Governor Advanced Server Configuration Option

Using the Query Governor Advanced Server Configuration Option

You can use the query governor advanced server configuration option to prevent long-running queries from executing, thus preventing system resources from being consumed for long. By default, this option allows all queries to execute, no matter how long they take. The query governor can however be set to the maximum number of seconds queries are allowed to execute. It can be done for all queries for all connections server wide, using

 sp_configure query governor cost limit value

Or, on a per-connection basis (that is, for the queries for a specific connection) using:

 SET QUERY_GOVERNOR_COST_LIMIT value

You should note that the query governor does not have any run-time overhead.

devx-admin

Share the Post: