DMT、LMT、MSSM、ASSM

dmt,lmt是管理segment中的extent的,而mssm和assm是管理extent中的block的。

1、dmt (dictionary managed tablespace)
       表空间里相应的数据文件中的extent是被使用了还是处于空闲是记录在两个数据字典表中(uet$:used extent;fet$:free extent),也就是说Oracle updates the appropriate tables in the data dictionary whenever an extent is allocated, or freed for reuse.需要注意的是查询这两个表需要sys用户
uet$字段简要介绍:
SEGFILE# segment header block所在的数据文件编号,对应dba_segments.header_file
SEGBLOCK# segment header block 编号,对应dba_segments.header_block
EXT# extent编号 对应dba_extents.extent_id
TS# tbs编号 对应v$tablespace.ts#
FILE# extent所在的datafile编号,对应dba_data_file.file_id
BLOCK# extent的起始block编号,对dba_extents.block_id
LENGTH 该extent从block#开始所包含的block的数量,对应dba_extents.blocks
fet$ 字段简要介绍:
TS# 同上
FILE# 同上
BLOCK# 数据文件file#上free block开始位置
LENGTH free block的长度,block的数量
       这种管理extent的方式存在的严重问题就是并发性支持很弱,因为在用户使用对象的过程中只要涉及到extent的分配或者回收。oracle内部都会对这两个表进行修改,对象越大,涉及到的extent数量越多,对这两个表修改锁定( ST (space transaction) lock )的时间就越长。如果并发用户再要多,这两个表上的资源争夺可想而知。另外在修改uet$和fet$的同时本身也是需要undo和redo的,而占用的undo和redo和修改普通表没有什么两样,因此对undo和redo资源本身也是一个冲击。oracle也意识到了Dmt存在的严
重缺陷,于是从9.2开始推出了lmt。


2、lmt (locally managed tablespace)
   lmt在记录extent是否是free还是used是通过在数据文件开头的几个block中通过bit位来记录的。数据库中如果不存在dmt类型的表空间,则uet$和fet$中不在有信息。

3、mssm (manual segment space management)
    mssm是通过segment header上的freelist 列表在管理extent上处于hwm(high warter mark)下的那些没有达到pctfree和曾经达到过pctfree但是后来由于delete等操作空间又紧缩下降到pctused的那些来自不同extent的block所组成的(doc:A free list is a list of free data blocks that usually includes blocks existing in a number of different extents within the segment. Free lists are composed of blocks in which free space has not yet reached PCTFREE or used space has shrunk below PCTUSED. Specify  the number of process free lists with the FREELISTS parameter. The default value of  FREELISTS is one. The maximum value depends on the data block size).
这种方式管理block存在的缺陷主要就是当并发用户针对同一个segment请求空闲空间比较多时,会在segment header上的freelists上争夺激烈.

4、assm (automatic segment space management)
     通过block来实现利用bitmap管理segment上block的空闲和使用情况的。oracle doc是如何来解释assm的:
This keyword tells Oracle that you want to use bitmaps to manage the free space within
segments. A bitmap, in this case, is a map that describes the status of each data block
within a segment with respect to the amount of space in the block available for inserting
rows. As more or less space becomes available in a data block, its new state is reflected in
the bitmap. Bitmaps enable Oracle to manage free space more automatically; thus, this form
of space management is called automatic segment-space management.
Locally managed tablespaces using automatic segment-space management can be created as
smallfile (traditional) or bigfile tablespaces. AUTO is the default.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值