Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 4 Β· Quiz
"Scalar UDFs and Row-by-Row Processing"
1. What is a primary issue with scalar UDFs in SQL Server 2017 and earlier?
They can be inlined into execution plans.
They run once per row, causing performance issues.
They are always executed in parallel.
They have no impact on execution plans.
2. How does SQL Server 2019 improve the performance of scalar UDFs?
It eliminates the use of UDFs entirely.
It allows scalar UDFs to be inlined into execution plans.
It executes UDFs in parallel only when called from a SELECT statement.
It converts all scalar UDFs into stored procedures.
3. What is the consequence of using a scalar UDF in a WHERE clause before SQL Server 2019?
It improves the performance significantly.
It is treated as a non-SARGable expression, impacting query optimization.
It allows parallel execution of queries.
It does not affect the execution plan at all.
4. What is one recommended alternative to using scalar UDFs for performance optimization?
Using multi-statement table-valued functions instead.
Implementing cursors to process each row individually.
Inlining the expression directly in the query.
Relying on heuristic optimizations by SQL Server.
Submit answers
Continue: "The Catch-All Report Query" β
Review this lesson
Retake quiz