Validate plan guides after upgrade

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance SQL database in Microsoft Fabric

Important

Query Store hints provide an easier-to-use method for shaping query plans without changing application code. Query Store hints are simpler than plan guides. Query Store hints are available in Azure SQL Database, SQL database in Microsoft Fabric, Azure SQL Managed Instance, and in SQL Server 2022 (16.x) and later versions.

We recommend re-evaluating and testing plan guide definitions when you upgrade your application to a new release of SQL Server. Performance tuning requirements and plan guide matching behavior may change. Although an invalid plan guide will not cause a query to fail, the plan is compiled without using the plan guide and may not be the best choice. After upgrading a database to a newer version of the Database Engine, we recommend that you perform the following tasks: