04 September 2009

Why does a DBMS interleave the actions of different transactions instead of executing transactions one after the other?

A DBMS is typically shared among many users. Transactions from these users can be interleaved to improve the execution time of users’ queries. By interleaving queries, users do not have to wait for other user’s transactions to complete fully before their own transaction begins. Without interleaving, if user A begins a transaction that will take 10 seconds to complete, and user B wants to begin a transaction, user B would have to wait an additional 10 seconds for user A’s transaction to complete before the database would begin processing user B’s request.

No comments:

Post a Comment