Using the Query Store
Configuring the Query Store is straightforward – we will enable it a few times in Chapter 10, so that we can work with some of the new intelligent query processing features. In this section, we will configure it. You may want to start with a fresh copy of the AdventureWorks2019 database. In SQL Server Management Studio, right-click the AdventureWorks database, select Properties, and then select Query Store. You will see something similar to the following:
Figure 9.1 – Query Store configuration
To enable the Query Store, you must change Operation Mode (Requested) to Read write. If you click the Script button at the top of the Database Properties window, the following code will be generated:
USE master
GO
ALTER DATABASE AdventureWorks2019 SET QUERY_STORE = ON
GO
ALTER DATABASE AdventureWorks2019 SET QUERY_STORE (OPERATION_MODE = READ_WRITE)
Click OK or run the produced code. In addition, you can use the same...