ITPub博客

首页 > 数据库 > Oracle > 关于如何释放表空间的问题(About Reclaimable Unused Space)

关于如何释放表空间的问题(About Reclaimable Unused Space)

原创 Oracle 作者:zhangsharp20 时间:2015-12-09 18:47:11 0 删除 编辑
Over time, performing insert, update, and delete operations (also referred to as DML operations) on objects within a tablespace can create pockets of empty space that individually are not big enough to be reused. Collectively, these pockets can waste large amounts of space. The sparsely populated objects that result can degrade performance during queries and DML operations.

随着时间的流逝,在表空间的对象上执行DML操作会产生单个的不是足够大用来重新使用的空间,但是如果这些空的空间汇总起来的话会产生空间的巨大浪费,这些极度分散的不断增加的对象会导致查询和DML操作性能的下降。

Oracle Database enables you reclaim this empty space with the following online operations—that is, operations that do not block queries or DML against affected objects while the operations are proceeding:

oracle会使你能够在开机状态下释放这些空的空间
,而且这些操作不会阻塞任何查询或DML对于收缩的对象

  • Online segment shrink

    Online segment shrink operates on table segments and on the segments of the dependent objects of the table, such as indexes and partitions. For each segment, data is compacted to the front of the segment. Free space can either be returned to the tablespace or kept in the segment for future insert operations.

    Online segment shrink is permitted only on segments in a locally managed tablespace with automatic segment space management. Online segment shrink is an in-place operation; no additional free space in the tablespace is required.

现在段收缩是对表的段和所有依赖于这个表的段进行的,例如索引和分区。对于每个段,数据都会在段压缩之前进行压缩。释放的空间要么返回给表空间要么被保存在段中供未来的insert操作使用。
线上段收缩只对本地ASSM管理的段有效。线上段收缩是一个本地化的操作,不需要额外的表空间。

  • Online table redefinition (also known as reorganization)

    Reorganization relocates the table and its dependent objects in a different part of the tablespace. This operation has the desirable side effect of compacting the data for those objects. For this operation to succeed, however, the tablespace must have free space equal to the size of the table and its dependent objects. Reorganization is the only permitted operation for dictionary-managed tablespaces or for locally managed tablespaces with manual segment space management.

表重组会重新分配在表空间的不同部分的表和它的相关依赖对象的位置。这个操作对这些对象数据的压缩有着很好效果。然而对于这个操作而言,如果想要成功,表空间必须有等于表和其依赖的对象所占有的空间的和的剩余空间,重组只是对于基于词典管理的表空间或者本地手工段空间管理的表空间才有效。

The Segment Advisor generates recommendations for shrinking or reorganizing segments that have a significant amount of reclaimable unused space.

顾问工具会生成推荐信息关于收缩和重组有着大量需要释放的空间的段。

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

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

注册时间:2014-08-12

  • 博文量
    382
  • 访问量
    631919