Developing SQL Databases — Question 139

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.
You are developing a new application that uses a stored procedure. The stored procedure inserts thousands of records as a single batch into the Employees table.
Users report that the application response time has worsened since the stored procedure was updated. You examine disk-related performance counters for the
Microsoft SQL Server instance and observe several high values that include a disk performance issue. You examine wait statistics and observe an unusually high
WRITELOG value.
You need to improve the application response time.
Solution: You replace the stored procedure with a user-defined function.
Does the solution meet the goal?

Answer options

Correct answer: B

Explanation

The solution does not meet the goal because replacing a stored procedure with a user-defined function may not resolve disk performance issues or improve response time. Stored procedures are typically more efficient for bulk operations like inserting thousands of records, while user-defined functions can introduce additional overhead. Therefore, the correct answer is B, as the proposed solution does not address the underlying performance problem.