Overview of Extents【每日一译】--2012-10-22

An extent is a logical unit of database storage space allocation made up of a number of
contiguous data blocks. One or more extents in turn make up a segment. When the
existing space in a segment is completely used, Oracle allocates a new extent for the

segment.

一个区块是数据库存储空间分配的逻辑单元它由许多相邻的数据块组成。一个或多个区块

反过来又组成了一个段。当在段中存在的空间已经完成使用了,对于此段ORACLE分配一个

新的块。

When Extents Are Allocated
When you create a table, Oracle allocates to the table’s data segment an initial extent
of a specified number of data blocks. Although no rows have been inserted yet, the
Oracle data blocks that correspond to the initial extent are reserved for that table’s

rows.

区块什么时候分配

当你创建一个表时,对于此表的数据段ORACLE分配了一个初始的指定数量的数据块的区块。

尽管还没有行插入进去,对应于初始化区块的ORACLE数据块是预留给表的行。


If the data blocks of a segment’s initial extent become full and more space is required
to hold new data, Oracle automatically allocates an incremental extent for that
segment. An incremental extent is a subsequent extent of the same or greater size than

the previously allocated extent in that segment.

如果此段的数据块的初始化区块使用完并且需要更多空间去保留新数据,ORACLE自动地

分配一个增量的区块对于此段。在那个段中一个增量的区块是一个后续同样大小或者更大

于之前分配的区块

的区块。

For maintenance purposes, the header block of each segment contains a directory of

the extents in that segment.

为了维护目的,对于每一个段都包含一个区块的目录在那个段的块头。


Note: This chapter applies to serial operations, in which one server
process parses and runs a SQL statement. Extents are allocated
somewhat differently in parallel SQL statements, which entail
multiple server processes.

备注:这段适用于串行操作,在此操作中一个服务进程解析和运行一个SQL语句。

区块的分配在一些地方不同于并行的SQL语句。它需要多个服务进程。

Determine the Number and Size of Extents
Storage parameters expressed in terms of extents define every segment. Storage
parameters apply to all types of segments. They control how Oracle allocates free
database space for a given segment. For example, you can determine how much space
is initially reserved for a table’s data segment or you can limit the number of extents
the table can allocate by specifying the storage parameters of a table in the STORAGE
clause of the CREATE TABLE statement. If you do not specify a table’s storage
parameters, then it uses the default storage parameters of the tablespace.

确定区块的数量和大小

存储参数的通过区块的条件来显示初始化每一个段。存储参数适合于段的所有类型。它们

控制ORACLE如何分配空间数据库空间对于一个给定的段。比如,你可以确定多少空间是

初始化预留给表的数据段或者你可以限定表可以分配的区块的数量通过指定的表的存储参数

在存储语句或者是创建表语句。如果你不指定表的存储参数,那么它将使用默认的表空间的

存储参数。

You can have dictionary managed tablespaces, which rely on data dictionary tables to
track space utilization, or locally managed tablespaces, which use bitmaps (instead of
data dictionary tables) to track used and free space. Because of the better performance
and easier manageability of locally managed tablespaces, the default for non-SYSTEM
permanent tablespaces is locally managed whenever the type of extent management is
not explicitly specified.

你可能拥有数据字典管理的表空间,它依赖于数据字典表去跟踪空间的使用,或者是本地

管理表空间,它使用们图(代替数据字典表)去跟踪使用和空闲空间。因为更好的性能和

更简单的管理对于本地管理的表空间,对于非系统永久表空间的默认表空间是本地管理的。

当一个区块的管理类型没有显式的指定时。


A tablespace that manages its extents locally can have either uniform extent sizes or
variable extent sizes that are determined automatically by the system. When you
create the tablespace, the UNIFORM or AUTOALLOCATE (system-managed) clause
specifies the type of allocation.

一个表空间本地管理它的区块可以使用区块大小单元或者是可变的区块大小,这些自动由

系统决定。当你创建表空间,那个UNIFORM或者AUTOALLOCATE(系统管理)语句指定了

分配的类型。

■ For uniform extents, you can specify an extent size or use the default size, which is
1 MB. Ensure that each extent contains at least five database blocks, given the
database block size. Temporary tablespaces that manage their extents locally can
only use this type of allocation.

对于区块的固定单元,你可以指定一个区块的大小或者使用默认值,它是1MB。确定那个

任何一个区块包含至少5个数据库块,给定数据块的大小。临时表空间本地的管理它们的区

块只能使用这种分配类型。

■ For system-managed extents, Oracle determines the optimal size of additional
extents, with a minimum extent size of 64 KB. If the tablespaces are created with
'segment space management auto’, and if the database block size is 16K or higher,

then Oracle manages segment size by creating extents with a minimum size of 1M.
This is the default for permanent tablespaces.

对于系统管理的区块,ORACLE确定了可选区块的最优大小,最小的区块大小是65KB,

如果表空间创建采用‘段空间的自动管理’,并且如果数据块的大小是16K或者是更多,那么

ORACLE管理段的大小采用创建区块的最小值1M。

这是永久表空间的默认值。

The storage parameters INITIAL, NEXT, PCTINCREASE, and MINEXTENTS cannot be
specified at the tablespace level for locally managed tablespaces. They can, however,
be specified at the segment level. In this case, INITIAL, NEXT, PCTINCREASE, and
MINEXTENTS are used together to compute the initial size of the segment. After the
segment size is computed, internal algorithms determine the size of each extent.

存储参数INITIAL,NEXT,PCTINCREASE,和MINEXTENTS不能指定的对于表空间级别的

本地管理表空间,不过它们可以在段的级别指定。这种情况,INITIAL,NEXT,PCTINCREASE,

和MINEXTENT是一起使用来计算段的初始化大小。当段的大小计算完后,内部算法决定了每个

区块的大小。


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值