segment space management automatic and manual

官方文档解释:
Specifying Segment Space Management in Locally Managed Tablespaces

In a locally managed tablespace, there are two methods that Oracle Database can use to manage segment space: automatic and manual. Manual segment space management uses linked lists called "freelists" to manage free space in the segment, while automatic segment space management uses bitmaps. Automatic segment space management is the more efficient method, and is the default for all new permanent, locally managed tablespaces.

Automatic segment space management delivers better space utilization than manual segment space management. It is also self-tuning, in that it scales with increasing number of users or instances. In an Oracle Real Application Clusters environment, automatic segment space management allows for a dynamic affinity of space to instances. In addition, for many standard workloads, application performance with automatic segment space management is better than the performance of a well-tuned application using manual segment space management.

Although automatic segment space management is the default for all new permanent, locally managed tablespaces, you can explicitly enable it with the SEGMENT SPACE MANAGEMENT AUTO clause.

The following statement creates tablespace lmtbsb with automatic segment space management:

CREATE TABLESPACE lmtbsb DATAFILE '/u02/oracle/data/lmtbsb01.dbf' SIZE 50M
    EXTENT MANAGEMENT LOCAL 
    SEGMENT SPACE MANAGEMENT AUTO;

The SEGMENT SPACE MANAGEMENT MANUAL clause disables automatic segment space management.

The segment space management that you specify at tablespace creation time applies to all segments subsequently created in the tablespace. You cannot change the segment space management mode of a tablespace.

Notes:

  • If you set extent management to LOCAL UNIFORM, then you must ensure that each extent contains at least 5 database blocks.

  • If you set extent management to LOCAL AUTOALLOCATE, and if the database block size is 16K or greater, then Oracle manages segment space by creating extents with a minimum size of 5 blocks rounded up to 64K.

  • You cannot specify automatic segment space management for the SYSTEM tablespace.

Locally managed tablespaces using automatic segment space management can be created as single-file or bigfile tablespaces, as described in "Bigfile Tablespaces".

翻译:

在本地管理的表空间中,Oracle数据库可以使用两种方法来管理分段空间:自动和手动。手动段空间管理使用称为“空闲列表”的链接列表来管理段中的空闲空间,而自动段空间管理使用位图。自动段空间管理是更有效的方法,并且是所有新的永久的本地管理的表空间的默认设置。

自动分段空间管理比手动分段空间管理提供更好的空间利用率。它也是自我调整的,因为它随着用户或实例的增加而变化。在Oracle Real Application Clusters环境中,自动段空间管理允许空间对实例的动态关联。另外,对于许多标准工作负载,具有自动段空间管理的应用程序性能优于使用手动段空间管理的经过良好调整的应用程序的性能。

虽然自动段空间管理是所有新的永久性,本地管理的表空间的默认设置,但您可以使用SEGMENT SPACE MANAGEMENT AUTO子句显式启用它

以下语句创建lmtbsb具有自动段空间管理的空间:

CREATE TABLESPACE lmtbsb DATAFILE'/u02/oracle/data/lmtbsb01.dbf'SIZE 50M 
    EXTENT MANAGEMENT LOCAL 
    SEGMENT SPACE MANAGEMENT AUTO;

SEGMENT SPACE MANAGEMENT MANUAL子句禁用自动段空间管理。

在表空间创建时指定的段空间管理适用于随后在表空间中创建的所有段。您不能更改表空间的段空间管理模式。

笔记:

  • 如果将扩展区管理设置为LOCAL UNIFORM,则必须确保每个扩展区至少包含5个数据库块。

  • 如果LOCAL AUTOALLOCATE将数据块管理设置为,并且数据库块大小为16K或更大,则Oracle通过创建最小大小为5个块的范围来管理段空间,所述范围四舍五入为64K。

  • 您不能为SYSTEM空间指定自动段空间管理

使用自动段空间管理的本地管理表空间可以创建为单文件或大文件表空间,如“Bigfile Tablespaces”中所述

手动管理:   通过freelists 管理段中的数据块,自由列表列出的允许进行插入操作的数据块。

通过PCT_FREE和PCT_USED两个参数来控制一个数据块是否允许插入数据。

自动管理使用位图来管理数据块,当块发生变化是oracle会更新位图,以反应这个数据块是否允许insert操作,位图使用oracle自动管理自由空间。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值