query governor cost limit

Type: Advanced

Default value: 0

Queries are often the cause of major performance problems. SQL Server can handle queries, but many are poorly written and don’t restrict the search criteria enough. This can result in runaway queries that return large result sets, and they can adversely affect the entire server’s performance. One way to control this situation is to cut off the query at the pass by specifying a maximum cost limit to queries, in seconds. If any query’s cost, in seconds, is greater than this maximum value, the query is not allowed to execute. The query governor cost limit value is server-wide and cannot be applied to just one query. Remember, though, that 0 (the default) for this option turns off the query ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.