正在加载图片...
Tuning of Transactions (Cont.) Long update transactions cause several problems ·Exhaust lock space Exhaust log space and also greatly increase recovery time after a crash,and may even exhaust log space during recovery if recovery algorithm is badly designed! Use mini-batch transactions to limit number of updates that a single transaction can carry out.E.g.,if a single large transaction updates every record of a very large relation,log may grow too big. Split large transaction into batch of"mini-transactions,"each performing part of the updates Hold locks across transactions in a mini-batch to ensure serializability If lock table size is a problem can release locks,but at the cost of serializability In case of failure during a mini-batch,must complete its remaining portion on recovery,to ensure atomicity. Database System Concepts-7th Edition 25.10 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 25.10 ©Silberschatz, Korth and Sudarshan th Edition Tuning of Transactions (Cont.) ▪ Long update transactions cause several problems • Exhaust lock space • Exhaust log space ▪ and also greatly increase recovery time after a crash, and may even exhaust log space during recovery if recovery algorithm is badly designed! ▪ Use mini-batch transactions to limit number of updates that a single transaction can carry out. E.g., if a single large transaction updates every record of a very large relation, log may grow too big. • Split large transaction into batch of “mini-transactions,'' each performing part of the updates • Hold locks across transactions in a mini-batch to ensure serializability ▪ If lock table size is a problem can release locks, but at the cost of serializability • In case of failure during a mini-batch, must complete its remaining portion on recovery, to ensure atomicity
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有