To turn on Query Store:
USE [master]
GO
ALTER DATABASE [DatabaseName] SET QUERY_STORE = ON
GO
ALTER DATABASE [DatabaseName] SET QUERY_STORE (OPERATION_MODE = READ_WRITE)
GO
You'll then notice a new folder within SSMS under the database you enabled it for:
Resources:
Excellent post on SQLShack: https://www.sqlshack.com/sql-server-query-store-overview/
Very in depth post from Red Gate: https://www.red-gate.com/simple-talk/sql/database-administration/the-sql-server-2016-query-store-overview-and-architecture/
More info on setting up and using Query Store: https://ballardchalmers.com/2019/07/23/query-store-sql-server/
No comments:
Post a Comment