How to: Configure the query governor cost limit Option (SQL Server Management Studio)

Use the query governor cost limit option to specify an upper limit on the time period in which a query can run. Query cost refers to the estimated elapsed time, in seconds, required to complete a query on a specific hardware configuration.

To set the query governor cost limit option

  1. In Object Explorer, right-click a server and select Properties.

  2. Click the Connections page.

  3. Select or clear the Use query governor to prevent long-running queries check box.

    If you select this check box, in the box below, enter a positive value, which the query governor uses to disallow execution of any query with a running length exceeding that value.