Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 3.76 KB

sys-query-store-plan-feedback.md

File metadata and controls

59 lines (50 loc) · 3.76 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.query_store_plan_feedback (Transact-SQL)
The sys.query_store_plan_feedback system view contains information about Query Store tuning via memory grant, CE, and DOP feedback.
WilliamDAssafMSFT
wiassaf
derekw
01/08/2024
sql
system-objects
reference
SYS.QUERY_STORE_PLAN_FEEDBACK_TSQL
QUERY_STORE_PLAN_FEEDBACK_TSQL
SYS.QUERY_STORE_PLAN_FEEDBACK
QUERY_STORE_PLAN_FEEDBACK
query_store_plan_feedback catalog view
sys.query_store_plan_feedback catalog view
TSQL
>=sql-server-ver16||>=sql-server-linux-ver16||=azuresqldb-mi-current||=azuresqldb-current

sys.query_store_plan_feedback (Transact-SQL)

[!INCLUDE sqlserver2022-asdb-asmi]

Contains information about Query Store tuning via query feedback features, including memory grant feedback, cardinality estimation (CE) feedback, and degree of parallelism (DOP) feedback.

Column name Data type Description
plan_feedback_id bigint Uniquely identifies the feedback change applied to a query.
plan_id bigint Foreign key. Joins to sys.query_store_plan (Transact-SQL).
feature_id tinyint ID of the feature in use.
feature_desc nvarchar(60) 1 = CE feedback
2 = memory grant feedback
3 = DOP feedback
feedback_data nvarchar(max) For CE feedback, displays query hints in use.

For memory grant feedback, displays JSON string containing operator-level grant values.
Format: {"node_id": value}, {"node_id": value},….
Example: {"NodeId":"0","AdditionalMemoryKB":"1152"},{"NodeId":"18","AdditionalMemoryKB":"1856"}
state int ID of the current feedback state.
state_desc nvarchar(60) 0. NO_FEEDBACK
1. NO_RECOMMENDATION
2. PENDING_VALIDATION
3. IN_VALIDATION
4. VERIFICATION_REGRESSED
5. VERIFICATION_PASSED
6. ROLLEDBACK_BY_APRC
7. FEEDBACK_VALID
8. FEEDBACK_INVALID
create_time datetimeoffset(7) When this row was created.
last_updated_time datetimeoffset(7) When this row was last updated.

Remarks

This catalog view will return the same row data on all replicas, if Query Store for secondary replicas is enabled.

Permissions

Requires the VIEW DATABASE STATE permission.

Related content