ITPub博客

首页 > Linux操作系统 > Linux操作系统 > block中free space的复用问题

block中free space的复用问题

原创 Linux操作系统 作者:ylw66 时间:2009-10-16 11:41:45 0 删除 编辑
关于这个问题,10g concept是这样写的:

Two types of statements can increase the free space of one or more data blocks:
DELETE statements, and UPDATE statements that update existing values to smaller
values. The released space from these types of statements is available for subsequent
INSERT statements under the following conditions:
■ If the INSERT statement is in the same transaction and subsequent to the
statement that frees space, then the INSERT statement can use the space made
available.
■ If the INSERT statement is in a separate transaction from the statement that frees
space (perhaps being run by another user), then the INSERT statement can use the
space made available only after the other transaction commits and only if the
space is needed.

英文是很好理解的,大致是这样
有两种可能data block会出现free space:1 delete 2 update to一个小值
接下来的insert在什么情况下会重用以上的free space呢,两种情况:
1 在同一事务中delete 或 update 后insert
2 在不同事务中,delete 或 update的事务提交,并且space is needed


无论我怎么实验(用9i或10g ,表空间用自动段管理或手动段管理),都无法实现复用条件中第1种情况
还有怎么理解 space is needed呢

对于DBA来说可能是个无用的问题,但就是想搞明白这个问题,既然Concepts都写出来了肯定是有道理的,也是觉得有了解的必要性的
请高手指点

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22111412/viewspace-616759/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-07-29

  • 博文量
    57
  • 访问量
    107666