Edit

Share via


sys.query_store_plan_feedback (Transact-SQL)

Applies to: SQL Server 2022 (16.x) and later versions Azure SQL Database Azure SQL Managed Instance SQL database in Microsoft Fabric

Contains information about Query Store tuning via query feedback features, including memory grant feedback, cardinality estimation (CE) feedback, degree of parallelism (DOP) feedback, and lock after qualification (LAQ) 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
4 = LAQ 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.