Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 2.48 KB

sys-database-query-store-internal-state-transact-sql.md

File metadata and controls

51 lines (41 loc) · 2.48 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.database_query_store_internal_state (Transact-SQL)
sys.database_query_store_internal_state contains information about queue length and memory usage for the Query Store when Query Store for secondary replicas is enabled.
rwestMSFT
randolphwest
09/19/2022
sql
system-objects
reference
QUERY_STORE_INTERNAL_STATE
SYS.QUERY_STORE_INTERNAL_STATE_TSQL
SYS.QUERY_STORE_INTERNAL_STATE
QUERY_STORE_INTERNAL_STATE_TSQL
database_query_store_internal_state catalog view
sys.database_query_store_internal_state catalog view
TSQL
>=sql-server-ver16||>=sql-server-linux-ver16||=azuresqldb-mi-current

sys.database_query_store_internal_state (Transact-SQL)

[!INCLUDE sqlserver2022-asmi]

Contains information about queue length and memory usage for the Query Store when Query Store for secondary replicas is enabled.

Column name Data type Description
pending_message_count bigint The number of messages waiting in the queue on the primary for the replica where the system view is being viewed from. Not nullable.
messaging_memory_used_mb bigint The amount of memory in total taken up by the messages in the queue. Not nullable.

Permissions

Requires the VIEW DATABASE STATE permission.

Remarks

For information on configured replicas for Query Store, see sys.query_store_replicas (Transact-SQL).

Next steps

Learn more about Query Store and related concepts in the following articles: