Question 180
A reviewer challenges the assumptions behind this issue: A report repeatedly calls a computationally heavy UDF per row for a value that could be obtained once per dimension. What evidence would best confirm the architectural weakness?
Explanation
Correct Answer
Repeated row-wise computation can dominate query cost when a set-based alternative exists. Evaluate set-based precomputation or a suitable transformation rewrite while checking semantics.
Incorrect Answers
Data delivery design matters when result transfer dominates query runtime. The refactored report matches outputs while reducing UDF executions.
Physical tuning benefits depend on scale and access patterns. Evaluate set-based precomputation or a suitable transformation rewrite while checking semantics.
Cost troubleshooting benefits from time-linked workload attribution and thresholds. The refactored report matches outputs while reducing UDF executions.