You need to ensure that the SQL Server 2008 server places the minimum possible number of locks on the table while the stored procedure is being executed

You are a database developer. You plan to design a database solution by using SQL Server
2008. A database contains a large non-partitioned table with 4 million rows. You write a
stored procedure that updates approximately 4,000 rows in the table. The stored procedure
is scheduled to run only during peak hours. The stored procedure runs frequently. Users
report performance issues. You discover that when the stored procedure runs, it results in
memory contention because of a high number of locks placed on the table. You need to
ensure that the SQL Server 2008 server places the minimum possible number of locks on
the table while the stored procedure is being executed. What should you do?

You are a database developer. You plan to design a database solution by using SQL Server
2008. A database contains a large non-partitioned table with 4 million rows. You write a
stored procedure that updates approximately 4,000 rows in the table. The stored procedure
is scheduled to run only during peak hours. The stored procedure runs frequently. Users
report performance issues. You discover that when the stored procedure runs, it results in
memory contention because of a high number of locks placed on the table. You need to
ensure that the SQL Server 2008 server places the minimum possible number of locks on
the table while the stored procedure is being executed. What should you do?

A.
Add the TABLOCK hint to the UPDATE statement in the procedure.

B.
Disable the LOCK_ESCALATION option of the table.

C.
Add the PAGLOCK hint to the UPDATE statement in the procedure.

D.
set the LOCK_ESCALATION option of the table to AUTO.



Leave a Reply 0

Your email address will not be published. Required fields are marked *