Question 10
A pricing report calls a scalar function per row and CPU increases with report size. The team is considering this step: Refactor into set-based expressions or eligible inline logic and benchmark. What evidence should they review before proceeding?
Explanation
Correct Answer
Examine UDF inlining eligibility, CPU profile and execution plan. Non-inlineable scalar UDF execution can make row-by-row evaluation expensive.
Incorrect Answers
Row-at-a-time scalar execution can be expensive; eligible inlining and semantic equivalence both need measurement.
More connections do not remove per-row computation; performance must be compared with unchanged amounts and boundary tests.
Cached data does not eliminate expensive function invocations, and a rewrite can alter calculation semantics beyond disk IO.