读书笔记 -- 《Oracle Core: Essential Internals for DBAs and Developers》 一

本文摘自《Oracle Core》一书,讨论了Oracle数据库中事务回滚涉及的复杂过程及高昂成本,特别是对于大型长时间运行的事务。文章还提到了使用未提交的数据作为临时解决方案的一种策略及其缺陷。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近在看一本书,《Oracle Core: Essential Internals for DBAs and Developers》 ,真是好书。

里面知识点太多,要是看完一切记下,估计会遗漏一些。

 

那就边看边记。

 

事务回滚的时候,很多步骤要执行,所以比较消耗资源。要是用插入数据不提交来实现临时功能,就不合适了。

下面是原文,比翻译过来贴切一些。

Rolling back involves a lot of work, and a rollback can take roughly the same amount of time as the original transaction, possibly generating a similar amount of redo.
But you have to remember that rolling back is an activity that changes data blocks, so you have to reacquire, modify, and write those blocks, and write the redo that describes how you’ve changed those blocks. Moreover, if the transaction was a large, long- running transaction, you may find that some of the blocks you’ve changed have been written to disc and flushed from the cache —so th ey’ll have to be read from disc before you can roll them back! 

  Note  Some systems use Oracle tables to hold “temporary” or “scratchpad”
information. One of the strategies used with such tables is to insert data without
committing it so that read consistency makes it private to the session, and then roll back
to make the data “go away.” There are many flaws in this strategy, the potentially high
cost of rolling back being just one of them. The ability to eliminate the cost of rollback is
one of the things that makes global temporary tables useful.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值