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:
- What are the overheads (besides
speed)? - 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?
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.