views:

49

answers:

1

We know that there are some scenarios that require us to implement transactions in code, such as SqlTransaction/TransactionScope in .Net framework. The questions are:

  1. What are the overheads (besides speed)?
  2. Does it gets worse if we add more layers between the transaction and the DB? If yes, then what are the overheads and what cause these overheads?
+1  A: 

We want to keep transactions short, to begin them as late as possible and to end them as early as possible. Otherwise concurrency hurts, and we are getting more lock waiting and deadlocks.

AlexKuznetsov