Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft SQL Server and Azure SQL offer a suite of query hints that can guide the query optimizer to generate alternative query execution plans that provide better performance. Query Store hints provide a user-friendly way to influence the shape of query plans without changing the application code. While Query Store hints are convenient, identifying the optimal hint for a specific query can require a manual trial-and-error process, which can be time consuming for users.
The Query Hint Recommendation tool, a component for SQL Server Management Studio (SSMS), automates the identification of optimal query hints to enhance SQL query performance. This tool allows users to explore query hints for a given query while minimizing the need for manual trial and error.
How it works
The tool takes a maximum tuning budget as input and makes the best use of the given time budget by skipping query hints that aren't expected to yield a better quality plan. The tool also computes the baseline performance without any hint and uses it to reject hints that yield a plan with performance worse than baseline or the best hint found so far.
In summary, the tool makes effective use of the tuning time budget to efficiently identify the optimal query hint.