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/