locally managed tablespace

本文详细介绍了Oracle数据库中本地管理表空间的原理及其优势。包括使用bitmap管理tablespace extent的方法,以及autoextent和uniform两种管理方式的区别。同时,还探讨了这种方式如何提高并发性和操作速度,并简化空间分配。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

locally managed tablespace 使用bitmap来管理tablespace extent. bitmap存储在每个文件的文件头中。每个extent占据bitmap中的一个bit.

管理extent的方式:autoextent(由oracle来自动管理),和uniform(通过表级存储参数)

[@more@]

A tablespace that manages its own extents maintains a bitmap in each datafile
to keep track of the free or used status of blocks in that datafile. Each bit
in the bitmap corresponds to a group of blocks. When an extent is
allocated or freed for reuse, Oracle changes the bitmap values to show the new
status of the blocks. These changes do not generate rollback information
because they do not update tables (like sys.uet$, sys.fet$) in the data dictionary
(except for special cases such as tablespace quota information).

Local management of extents automatically tracks adjacent free space,
eliminating the need to coalesce free extents. The sizes of extents that are
managed locally can be determined automatically by the system. Alternatively,
all extents can have the same size in a locally managed tablespace.

*当选择使用AUTOEXTENT作为extent管理方式时:

由oracle来自动管理extent分配,默认的初始extent大小为64KB.Users cannot specify an extent size.

*当选择使用UNIFORM作为extent管理方式时:

表级存储参数只是为了计算每个表的初始分配大小(根据initial, next, min_extents, pctincrease值),之后的每个表的extent大小为tablespace extent的大小或是其整数倍。

表的每个extent都要等于tablespace extent的大小或是其整数倍。

原文如下:

tables' storage parameters are taken in consideration when
initially calculating the size of each table (in terms of number of allocated
ts extents). After that, each allocated extent will be the tablespace's extent
size, or multiple extents - if table extent is allocated via
"alter table allocate extent (size XXX)".

-------------------------------------------------------------

Locally managed tablespace 好处:

Locally managed tablespaces track all extent information in the tablespace itself, using bitmaps, resulting in the following benefits:

  • Improved concurrency and speed of space operations, because space allocations and deallocations predominantly modify locally managed resources (bitmaps stored in header files) rather than requiring centrally managed resources such as enqueues
  • Improved performance, because recursive operations that are sometimes required during dictionary-managed space allocation are eliminated
  • Readable standby databases are allowed, because locally managed temporary tablespaces (used, for example, for sorts) are locally managed and thus do not generate any undo or redo.
  • Simplified space allocation--when the AUTOALLOCATE clause is specified, appropriate extent size is automatically selected
  • Reduced user reliance on the data dictionary because necessary information is stored in file headers and bitmap blocks

All tablespaces, including the SYSTEM tablespace, can be locally managed.

Additionally, the DBMS_SPACE_ADMIN package provides maintenance procedures for locally managed tablespaces.

----------------------------------------------------

References
----------
Note:93771.1 Introduction to Locally-Managed Tablespaces

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

转载于:http://blog.itpub.net/87149/viewspace-921226/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值