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.

See also  How College Students Can Shape the Future of Tech Responsibility
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist