SET QUERY_GOVERNOR_COST_LIMIT (Transact-SQL)
Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Overrides the currently configured query governor cost limit value for the current connection.
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.
Using SET QUERY_GOVERNOR_COST_LIMIT applies to the current connection only and lasts the duration of the current connection. Use the Configure the query governor cost limit Server Configuration Optionoption of sp_configure to change the server-wide query governor cost limit value. For more information about configuring this option, see sp_configure and Server Configuration Options (SQL Server).
The setting of SET QUERY_GOVERNOR_COST_LIMIT is set at execute or run time and not at parse time.