Query Store in action

In this section, you will see how Query Store collects information about queries and query plans and how it can identify and fix regressed queries. We will demonstrate how Query Store supports and facilitates an upgrade to SQL Server 2017.

In this exercise, you will use the WideWorldImporters sample database. To simulate having created that database with SQL Server 2012, set the compatibility level to 110:

ALTER DATABASE WideWorldImporters SET COMPATIBILITY_LEVEL = 110;

Now, you will enable and configure Query Store for the database. It will accompany you in your migration adventures. The following statement enables and configures Query Store for the sample database:

ALTER DATABASE WideWorldImportersSET QUERY_STORE = ...

Get SQL Server 2017 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.