O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required