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
To reproduce the issue on AdventureWorks2019 database generate the estimated plan for these two queries:
select p.* from Person.Person p where p.LastName = 'Chen'
select p.* from Person.Person p where p.LastName = 'Chen' and p.PersonType = 'IN'
Both plans consist of a nested loop with an Index Seek + Key Lookup.
In query 2 the Key Lookup also includes a predicate to check PersonType = 'IN' on the other hand in query 1 the Key Lookup only retrieves fields for select p.*.
In query 1 execution plan Estimated Number of Rows Per Execution is 1 as expected.
In query 2 execution plan Estimated Number of Rows Per Execution is 98.8758 but in this case it refers to the total number of rows expected for all the 103 expected executions.
In graphical representation both for query 1 and query 2 the product of Estimated Number of Executions x Estimated Number of Rows Per Execution is displayed as number of rows returned by Key Lookup, but it seems for query 2 just Estimated Number of Rows Per Execution should be displayed.
Type: Bug
To reproduce the issue on AdventureWorks2019 database generate the estimated plan for these two queries:
select p.* from Person.Person p where p.LastName = 'Chen'
select p.* from Person.Person p where p.LastName = 'Chen' and p.PersonType = 'IN'
Both plans consist of a nested loop with an Index Seek + Key Lookup.
In query 2 the Key Lookup also includes a predicate to check
PersonType = 'IN'
on the other hand in query 1 the Key Lookup only retrieves fields forselect p.*
.In query 1 execution plan
Estimated Number of Rows Per Execution
is 1 as expected.In query 2 execution plan
Estimated Number of Rows Per Execution
is 98.8758 but in this case it refers to the total number of rows expected for all the 103 expected executions.In graphical representation both for query 1 and query 2 the product of
Estimated Number of Executions
xEstimated Number of Rows Per Execution
is displayed as number of rows returned by Key Lookup, but it seems for query 2 justEstimated Number of Rows Per Execution
should be displayed.key-lookup-with-predicate.txt
key-lookup-no-predicate.txt
Azure Data Studio version: azuredatastudio 1.50.0 (49c73a8, 2024-11-17T22:25:36.863Z)
OS version: Darwin arm64 24.1.0
Restricted Mode: Yes
Preview Features: Enabled
Modes: Restricted
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Extensions (3)
The text was updated successfully, but these errors were encountered: