You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contains information about the parent-child relationships between the original parameterized queries (also known as parent queries), dispatcher plans, and their child query variants. This catalog view shows all query variants associated with a dispatcher and the original parameterized queries. Query variants share the same query_hash value as viewed from sys.query_store_query. When you join sys.query_store_query_variant with sys.query_store_query and sys.query_store_runtime_stats, you can obtain aggregate resource usage statistics for queries that differ only by their input values.
Column name
Data type
Description
query_variant_query_id
bigint
Primary key. ID of the parameterized sensitive query variant.
parent_query_id
bigint
ID of the original parameterized query.
dispatcher_plan_id
bigint
ID of the parameter sensitive plan optimization dispatcher plan.
Remarks
Because more than one query variant can associate with a single dispatcher plan, multiple plans belong to query variants and contribute to the overall resource usage statistics of the parent query. The dispatcher plan for query variants doesn't produce runtime statistics in the Query Store. As a result, existing Query Store queries aren't sufficient for gathering overall statistics unless you include an extra join to the sys.query_store_query_variant view.
Permissions
Requires the VIEW DATABASE STATE permission.
Permissions for SQL Server 2022 and later
Requires the VIEW DATABASE PERFORMANCE STATE permission on the database.