How can sql server handle multiple write requests at the same time?
Anonymous User
370

Hi Guys,

Im trying to understand concurrency in db lately and im finding it hard to get a hold of it.
How does sql server handle multiple write requests at the same time?

For eg :

Table Bank_Account:

id,
user_name,
balance

1,
test_user,
100

I have two requests that are modifiying the same record in the table,

request1 is subtracting 100
request2 is subtracting 100

which request is handled first if both are triggered for the same time?
I know db transcation can be used to handle multiple threads. But doesnt that increase the latency?

Any Help is appreciated.

Thank you again

Comments (1)