Microsoft
70-451 · Question #48
You have a stored procedure that uses a cursor. The stored procedure updates several related tables. You discover that the stored procedure runs slowly and uses a significant amount of resources on…
The correct answer is C. Rewrite the cursor by using set-based operations. See the full explanation below for the reasoning.
Question
You have a stored procedure that uses a cursor. The stored procedure updates several related tables. You discover that the stored procedure runs slowly and uses a significant amount of resources on the database server. You need to recommend changes to the stored procedure to meet the following requirements:
- Minimize execution time
- Minimize development effort
- Minimize server resource requirements
What should you recommend?
Options
- AChange the cursor to a dynamic cursor.
- BChange the cursor to a client-side cursor.
- CRewrite the cursor by using set-based operations.
- DRewrite the cursor by using recursive CLR stored procedure.
How the community answered
(30 responses)- A17% (5)
- B3% (1)
- C73% (22)
- D7% (2)
Community Discussion
No community discussion yet for this question.