You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/t-sql/queries/hints-transact-sql-query.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -354,7 +354,7 @@ The following hint names are supported:
354
354
|`'FORCE_LEGACY_CARDINALITY_ESTIMATION'` <aid="use_hint_ce70"></a> | Forces the Query Optimizer to use [Cardinality Estimation](../../relational-databases/performance/cardinality-estimation-sql-server.md) model of [!INCLUDE [ssSQL11](../../includes/sssql11-md.md)] and earlier versions. This hint name is equivalent to [trace flag](../database-console-commands/dbcc-traceon-trace-flags-transact-sql.md) 9481 or [database scoped configuration](../statements/alter-database-scoped-configuration-transact-sql.md) setting `LEGACY_CARDINALITY_ESTIMATION = ON`. |
355
355
|`'QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n'` <sup>1</sup> | Forces the Query Optimizer behavior at a query level. This behavior happens as if the query was compiled with database compatibility level *n*, where *n* is a supported database compatibility level. For a list of currently supported values for *n*, see [sys.dm_exec_valid_use_hints](../../relational-databases/system-dynamic-management-views/sys-dm-exec-valid-use-hints-transact-sql.md).<br /><br />**Applies to**: [!INCLUDE [ssSQL17](../../includes/sssql17-md.md)] CU 10 and later versions, and [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)]|
356
356
|`'QUERY_PLAN_PROFILE'` <sup>2</sup> | Enables lightweight profiling for the query. When a query that contains this new hint finishes, a new extended event, `query_plan_profile`, is fired. This extended event exposes execution statistics and actual execution plan XML similar to the `query_post_execution_showplan` extended event but only for queries that contains the new hint.<br /><br />**Applies to**: [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] SP 2 CU 3, [!INCLUDE [ssSQL17](../../includes/sssql17-md.md)] CU 11, and later versions |
357
-
|`'DISABLE_RESULT_SET_CACHE'`| Disables result set caching (preview) for a specific run of a query, if result set cache is enabled for the currently connected item. This means it will neither generate new result set cache nor use existing result set cache (if any). This could be useful in debugging or A/B testing scenarios. For more information, see [Result set caching](/fabric/data-warehouse/result-set-caching).<br /><br />**Applies to**: [!INCLUDE [fabric](../../includes/fabric.md)]|
357
+
|`'DISABLE_RESULT_SET_CACHE'`| Disables result set caching for a specific run of a query, if result set cache is enabled for the currently connected item. This means it will neither generate new result set cache nor use existing result set cache (if any). This could be useful in debugging or A/B testing scenarios. For more information, see [Result set caching](/fabric/data-warehouse/result-set-caching).<br /><br />**Applies to**: [!INCLUDE [fabric-dw](../../includes/fabric-dw.md)]|
358
358
359
359
<sup>1</sup> The `QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n` hint doesn't override default or legacy cardinality estimation setting, if you force it through database scoped configuration, trace flag, or another query hint such as `QUERYTRACEON`. This hint only affects the behavior of the Query Optimizer. It doesn't affect other features of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] that might depend on the [database compatibility level](../statements/alter-database-transact-sql-compatibility-level.md), such as the availability of certain database features. For more information, see [Developer's Choice: Hinting Query Execution model](/archive/blogs/sql_server_team/developers-choice-hinting-query-execution-model).
360
360
@@ -797,9 +797,11 @@ FROM FactInternetSales
797
797
OPTION (FORCE DISTRIBUTED PLAN);
798
798
```
799
799
800
-
### Q. Disable a queryfromcreating or applyingresultsetcache (preview)
Use `'DISABLE_RESULT_SET_CACHE'` as a `hint_name` to block result set cache for a particular run of a query. For more information, see [Result set caching](/fabric/data-warehouse/result-set-caching).
0 commit comments