How PCTFREE and PCTUSED Work Together【每日一译】--2012-10-21

PCTFREE and PCTUSED work together to
optimize the use of space in the data blocks of the extents within a data segment.

Figure 2–5 illustrates the interaction of these two parameters.

PCTFREE和PCTUSED一起工作去优化一个数据段的区间的数据块的使用空间

图表2-5列出了这两个参数的协调工作

In a newly allocated data block, the space available for inserts is the block size minus
the sum of the block overhead and free space (PCTFREE). Updates to existing data can
use any available space in the block. Therefore, updates can reduce the available space
of a block to less than PCTFREE, the space reserved for updates but not accessible to
inserts.

在一个新分配的数据块,对于插入的可用空间是块的大小减去块的总共消耗和空闲空间(PCTFREE)。更新

存在的数据可以使用任何块中的可用空间。所以,更新可以减少块的可用空间到小于PCTFREE,这个空间

预留给更新但对于INSERT它是不可访问的。


For each data and index segment, Oracle maintains one or more free lists—lists of
data blocks that have been allocated for that segment’s extents and have free space
greater than PCTFREE. These blocks are available for inserts. When you issue an
INSERT statement, Oracle checks a free list of the table for the first available data block
and uses it if possible. If the free space in that block is not large enough to
accommodate the INSERT statement, and the block is at least PCTUSED, then Oracle
takes the block off the free list. Multiple free lists for each segment can reduce
contention for free lists when concurrent inserts take place.

对于任何一个数据和索引段,ORACLE维护一个或更多的自由列表-数据块的自由列表已经

分配给段的区块并且拥有的空闲空间大于PCTFREE。这些块对于插入是可用的。当你输入

一个插入语句时候,ORACLE核对对于第一个可用数据块的表空闲列表并且使用它如果可以。

如果块中的空闲空间不能容纳INSERT语句,并且块至少达是PCTUSED大小,那么ORACLE

将它在空闲列表删除,多个空闲列表对于段来说可以减少空闲列表的竞争当并发插入发生时。


After you issue a DELETE or UPDATE statement, Oracle processes the statement and
checks to see if the space being used in the block is now less than PCTUSED. If it is,
then the block goes to the beginning of the transaction free list, and it is the first of the
available blocks to be used in that transaction. When the transaction commits, free
space in the block becomes available for other transactions.

在输入一个DELETE和UPDATE语句,ORACLE处理该语句并且核对块中的空间使用现在

是否小于PCTUSED。如果它是,那么此块将在此事务开始时进入空闲列表,并且它为此

事务中第一次的可用数据块。当事务提交时,块中的空闲空间对于其它事务将变得可用。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值