Sample Header Ad - 728x90

Execution plan with a lot of ComputeScalar operations

4 votes
1 answer
688 views
I executed the same query with and without OPTION (RECOMPILE). When I compare the 2 plans, visually the one main difference I see is that the plan without option recompile shows a lot of ComputeScalar operators and the other one doesn't have any. Here are the two plans: Without OPTION Recompile: https://www.brentozar.com/pastetheplan/?id=S1OcZGi85 With OPTION recompile: https://www.brentozar.com/pastetheplan/?id=ryJAfMsL5 Why does one plan use a ton of compute scalar and the other one doesn't? The query without option recompile takes nearly 4 minutes to execute. Are the compute scalar operations causing the slowness?
Asked by DBK (378 rep)
May 12, 2022, 11:11 PM
Last activity: May 13, 2022, 04:24 AM