How would you prevent queries that retrieve and read data from blocking queries that insert and update data?

You work as a SQL Server 2012 database developer at ABC.com. ABC.com has a large database

named SalesDB.
New rows are inserted into the tables in the SalesDB database and updates to existing rows occur
on a high frequency. The inserts and updates often blocked by queries retrieving and reading
data.
How would you prevent queries that retrieve and read data from blocking queries that insert and
update data?

You work as a SQL Server 2012 database developer at ABC.com. ABC.com has a large database

named SalesDB.
New rows are inserted into the tables in the SalesDB database and updates to existing rows occur
on a high frequency. The inserts and updates often blocked by queries retrieving and reading
data.
How would you prevent queries that retrieve and read data from blocking queries that insert and
update data?

A.
You should make use of the SERIALIZABLE ISOLATION LEVEL.

B.
You should make use of the SNAPSHOT ISOLATION LEVEL.

C.
You should make use of the REPEATABLE READ ISOLATION LEVEL.

D.
You should make use of the READCOMMITTED ISOLATION LEVEL.

E.
You should make use of the READPAST ISOLATION LEVEL

Explanation:

Ref: http://msdn.microsoft.com/en-us/library/ms173763.aspx



Leave a Reply 9

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


SQL2kGuy

SQL2kGuy

SNAPSHOT ISOLATION LEVEL reduces blocking. READPAST hint reduces blocking.

John

John

I would agree, A isn’t correct. I would say READPAST is the correct answer.

rock

rock

READPAST is a table hint NOT an ISOLATION level… its just that simple

PUSKY

PUSKY

The answer is B. SNAPSHOT ISOLATION LEVEL

Shujie

Shujie

SNAPSHOT isolation level uses tempdb and the SNAPSHOT isolation level does not require shared locks on the underlying data so it will not block queries that insert and update data.

DEREJE

DEREJE

The highest isolation level, serializable, guarantees that a transaction will retrieve exactly the same data every time it repeats a read operation, but it does this by performing a level of locking that is likely to impact other users in multi-user systems. The lowest isolation level, read uncommitted, may retrieve data that has been modified but not committed by other transactions. All of the concurrency side effects can happen in read uncommitted, but there is no read locking or versioning, so overhead is minimized