70-451 · Question #94
You are a database developer. You create a database by using SQL Server 2008 in an enterprise environment. The database contains two stored procedures named ModifySales and RetrieveSalesTrend. The…
The correct answer is D. Add the NOLOCK hint to the SELECT statements in RetrieveSalesTrend. See the full explanation below for the reasoning.
Question
You are a database developer. You create a database by using SQL Server 2008 in an enterprise environment. The database contains two stored procedures named ModifySales and RetrieveSalesTrend. The ModifySales stored procedure uses a transaction that updates a table named SalesOrders. The RetrieveSalesTrend stored procedure retrieves and aggregates data from the SalesOrders table for a sales trend analysis report. Both stored procedures are executed frequently each day. Users report a considerable wait time while they run the sales trend analysis report. You need to ensure that sales trend analysis report runs as quickly as possible. What should you do?
Options
- AChange the isolation level to SERIALIZABLE for ModifySales.
- BChange the isolation level to READ UNCOMITTED for ModifySales.
- CAdd the NOWAIT hint to the SELECT statement in RetrieveSalesTrend.
- DAdd the NOLOCK hint to the SELECT statements in RetrieveSalesTrend.
How the community answered
(39 responses)- A8% (3)
- B13% (5)
- C3% (1)
- D77% (30)
Community Discussion
No community discussion yet for this question.