INSULATION HAZARD REPEAT IN SQL Server

What are the risks or performance degradation when using an ESTABLISHED IMAGE LEVEL?

We have several SPs called from BizTalk services. Sometimes we get into a dead end. If we change the isolation level, what are the risks and potential performance degradations?

+4
source share
4 answers

Repeated reads will put locks on all lines that were received. In situations where you work with cursors that receive large amounts of data, they can cause rivalry with other users, because they cannot get locks to update any of the lines read by cursors with a repeat of Reading until the cursor is closed.

The risk of performance degradation is that transactions may suffer an increased number of timeouts and / or deadlocks. This risk is proportional to the probability that two transactions read / update the same lines at the same time. Another factor that can affect your application is the size of the lock. If the locks are accepted at the page level, then a conflict may arise if these different transactions must access the lies on the same page - not necessarily the same line.

On the other hand, when you use a lower isolation level, cursor stability, for example, you leave open the possibility that the rows that you previously retrieved during a transaction may be updated by other transactions before your unit of work is completed.

+5
source

Give it a try. We cannot tell you what potential risks or performance problems you may encounter with one data point (LEVEL OF OPERATION OF THE OPERATION). We do not know anything about your data, data volume, TPS, data dependencies. Whenever it comes to performance, try measuring it. There is no other answer.

+2
source

To add to what has already been said: you cannot completely eliminate deadlocks. All you can do is minimize the likelihood that they will happen.

+2
source

Repeated reads do not cancel shared locks after recordings have been made.

This means that if you performed a SELECT transaction in an RR transaction, simultaneous transactions will not be able to update rows locked by your SELECT .

+1
source

Source: https://habr.com/ru/post/1299651/


All Articles