Query Store architecture

Query Store is integrated with the query processor in the database engine. A simplified Query Store architecture in SQL Server 2017 is shown in the following figure:

Query Store architecture

Query Store actually has three stores:

  • Query and Plan Store: This stores information about executed queries and execution plans used for their execution
  • Runtime Statistics store: This store holds aggregated execution parameters (execution time, logical reads, and so on) for executed queries within a specified time
  • Wait Stats Store: This store persists wait statistics information

All three stores have instances in memory and persisted ...

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.