Compensation-based query processing has been proposed in order to avoid lock contention between updating transactions and ad-hoc queries. This paper presents an algorithm based on undoo-redo compensation. A query will read an inconsistent version of the database, but updates made by concurrent transactions are later undone to make the query result transaction-consistent. By processing the database internal log to obtain information on concurrent updates, queries impose no extra work on updating transactions. A simulation study shows that response times for query execution is significantly improved compared to the earlier compensation-based algorithms. Compared to executing queries with no consistency requirements, the algorithm gives only a small increase in query response times, while the effects on transaction response times are negligible.
展开▼