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/relational-databases/performance/query-store-hints.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,21 +101,21 @@ When hints are applied, the following result set appears in the `StmtSimple` ele
101
101
* Queries will always execute where any opposing Query Store hints, that would otherwise cause an error, will be ignored.
102
102
* If Query Store hints contradict, SQL Server will not block query execution and Query Store hint will not be applied.
103
103
* Simple parameterization - Query Store hints are not supported for statements that qualify for simple parameterization.
104
-
* Forced parameterization - The RECOMPILE hint is not compatible with forced parameterization set at the database level. If the database has forced parameterization set, and the RECOMPILE hint is part of the hints string set in Query Store for a query, SQL Server will ignore the RECOMPILE hint and will apply any other hints if they are leveraged.
104
+
* Forced parameterization - The RECOMPILE hint is not compatible with forced parameterization set at the database level. If the database has forced parameterization set, and the RECOMPILE hint is part of the hints string set in Query Store for a query, SQL Server will ignore the RECOMPILE hint and will apply any other hints if they are applied.
105
105
* Additionally, SQL Server will issue a warning (error code 12461) stating that the RECOMPILE hint was ignored.
106
106
* For more information on forced parameterization use case considerations, see [Guidelines for Using Forced Parameterization](../query-processing-architecture-guide.md#forced-parameterization).
107
107
* Currently, Query Store hints can be applied against the primary replica of an Always On availability group.
108
-
* Manually-created Query Store hints are permenantly exempt from cleanup. The hint and the query will not be cleaned up from Query Store by the automatic retention of the capture policy.
109
-
*Queryies can be manually removed by users, which would also remove the associated Query Store hints.
110
-
* Query Store hints automatically generated by the [CE Feedback](intelligent-query-processing-details.md#cardinality-estimation-ce-feedback) are subject to cleanup by the automatic retention of the capture policy.
111
-
*[DOP feedback](intelligent-query-processing-details.md#dop-feedback) and [memory grant feedback](intelligent-query-processing-details.md#memory-grant-feedback) shape query behavior without using Query Store hints. When queries are cleanup by automatic retnetion of the capture policy, DOP feedback and memory grant feedback data is also cleaned up.
112
-
* You can manually create the Query Store hint that CE feedback implemented, and then the query with the hint would no longer be subject to cleanup by the automatic retention of the capture policy.
108
+
* Manuallycreated Query Store hints are permanently exempt from cleanup. The hint and the query will not be cleaned up from Query Store by the automatic retention of the capture policy.
109
+
*Queries can be manually removed by users, which would also remove the associated Query Store hints.
110
+
* Query Store hints automatically generated by the [CE Feedback](intelligent-query-processing-details.md#cardinality-estimation-ce-feedback) are subject to clean up by the automatic retention of the capture policy.
111
+
*[DOP feedback](intelligent-query-processing-details.md#dop-feedback) and [memory grant feedback](intelligent-query-processing-details.md#memory-grant-feedback) shape query behavior without using Query Store hints. When queries are cleanup by automatic retention of the capture policy, DOP feedback and memory grant feedback data is also cleaned up.
112
+
* You can manually create the Query Store hint that CE feedback implemented, and then the query with the hint would no longer be subject to clean up by the automatic retention of the capture policy.
113
113
114
114
115
115
## Query Store hints best practices
116
116
117
117
* Complete index and statistics maintenance before evaluating queries for potential new Query Store hints.
118
-
* Test your application database on the latest [compatibility level](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md), before leveraging Query Store hints.
118
+
* Test your application database on the latest [compatibility level](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md) before using Query Store hints.
119
119
* For example, Parameter Sensitive Plan (PSP) optimization was introduced in [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)] (compatibility level 160), which leverages multiple active plans per query to address non-uniform data distributions. If your environment cannot use the latest compatibility level, Query Store hints using the RECOMPILE hint can be leveraged on any supporting compatibility level.
120
120
* Query Store hints override SQL Server query plan behavior. It is recommended to only leverage Query Store hints when it is necessary to address performance related issues.
121
121
* It is recommended to reevaluate Query Store hints, statement level hints, plan guides, and Query Store forced plans any time data distributions change and during database migrations projects. Changes in data distribution may cause Query Store hints to generate suboptimal execution plans.
0 commit comments