本地表空間管理優點vs資料字典表空間管理(轉載)
本地表空間管理優點vs資料字典表空間管理
Advantages of Using Locally Managed vs Dictionary Managed Tablespaces
PURPOSE
-------
This article describes the locally managed tablespaces, and some of the
advantages of using them over dictionary managed tablespaces.
SCOPE & APPLICATION
-------------------
It is intended for both analysts and customers.
LOCALLY MANAGED TABLESPACES
---------------------------
A Locally Managed Tablespace is a tablespace that manages its own extents
maintaining 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
block or
a group of blocks. When the extents are 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 in the
data dictionary (except for tablespace quota
information), unlike the default
method of Dictionary - Managed
Tablespaces.
** Reduced recursive space management
** Reduced contention on
data dictionary tables
** No rollback generated
** No coalescing
required
SPACE MANAGEMENT IN
TABLESPACES
-------------------------------
** Free extents recorded in bitmap (so some
part of the tablespace is set aside
for bitmap)
** Each bit
corresponds to a block or group of blocks
** Bit value indicates free or
unused
** Common views used are DBA_EXTENTS and DBA_FREE_SPACE
Syntax
------
The LOCAL option of the EXTENT MANAGEMENT clause specifies that a tablespaces
is to be locally managed.
Extent_management_clause:
[EXTENT MANAGEMENT
{DICTIONARY |
LOCAL
{AUTOALLOCATE | UNIFORM [SIZE integer [K|M] }}]
where:
DICTIONARY specifies that the tablespace is managed using dictionary
tables (this is the default)
LOCAL specifies that tablespace is locally managed with a bitmap
AUTOALLOCATE specifies that the tablespace is system managed (users cannot
specify an extent size)
UNIFORM specifies that the tablespace is managed with uniform extents
of SIZE bytes (use K or M to specify the extent size in
kilobytes or megabytes. The default size is one megabyte.
If you specify, LOCAL, you cannot specify DEFAULT
storage_clause, MINIMUM EXTENT or TEMPORARY.
Prior to Oracle 9.2, you may use the EXTENT MANAGEMENT clause when creating
permanent and temporary tablespaces other than SYSTEM.
In Oracle 9.2, all
tablespaces, including the SYSTEM tablespace, can be locally
managed. When
you specify the EXTENT MANAGEMENT LOCAL clause in the CREATE
DATABASE
statement, you cause Oracle to create a locally managed SYSTEM
tablespace
wherein Oracle determines extent sizes. The COMPATIBLE
initialization parameter
must be set to 9.2 or higher for this statement to
be successful. A locally
managed SYSTEM tablespace is created AUTOALLOCATE
by default. It is not possible
to create a locally managed SYSTEM tablespace
and specify UNIFORM extent size.
The new mandatory SYSAUX tablespace from Oracle 10g onwards must be locally
managed
with SEGMENT SPACE MANAGEMENT AUTO.
The storage parameters NEXT, PCTINCREASE, MINEXTENTS, MAXEXTENTS, and
DEFAULT STORAGE are not valid for locally managed tablespaces
in the
CREATE TABLESPACE syntax. As far as object creation in LMT is concerned,
objects' storage parameters
will define the number of LMT's extents used for
the initial object creation.
It is not possible to alter the method of space management later.
Starting with Oracle 8.1.6, you may migrate dictionary managed tablespaces to
locally managed tablespaces, where in 8.1.5 this is not possible.
You
can migrate your existing tablespace to locally managed by using the
DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL procedure.
Additionally, the
DBMS_SPACE_ADMIN package provides maintenance procedures for
locally managed
tablespaces.
Starting in 10g, Oracle lets you create bigfile tablespaces.
A Bigfile
tablespace is a tablespace containing a single very large data file.
Bigfile
tablespaces are supported only for locally managed tablespaces.
See Note
262472.1 for more info on Bigfile tablespaces.
In this statement, we assume that the database block is 2K:
CREATE TABLESPACE tbs_1
DATAFILE 'file_tbs1.dbf' SIZE 10M
EXTENT
MANAGEMENT LOCAL
UNIFORM SIZE 128K
This statement creates a locally managed tablespace in which every extent
is 128K and each bit in the bit map describes 64 blocks. In essence, if we
assume a default database block size of 2K, and that each bit in the map
represents one extent (128K), then each bit maps (128k UNIFORM SIZE / 2k
ORACLE BLOCK SIZE) 64 oracle blocks.
Oracle strongly recommends that you create tablespaces that are locally
managed rather than dictionary managed.
The creation of new
dictionary-managed tablespaces is scheduled for desupport.
*****************************************************************************************
***ADVANTAGES
IN USING LOCALLY MANAGED TABLESPACES OVER DICTIONARY MANAGED
TABLESPACES***
*****************************************************************************************
- Because locally managed tablespaces do not record free space in data
dictionary, it reduces contention on these tables.
- Local management of extents automatically tracks adjacent free space,
eliminating the need to coalesce free extents.
- Avoids recursive space management operations, which can occur in
dictionary-managed tablespaces if consuming or releasing space in an
extent results in another operation that consumes or releases space in
a
rollback segment or data dictionary table.
- 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.
- Changes to the extent bitmaps do not generate rollback information
because they do not update tables in the data dictionary (except for
special cases such as tablespace quota information).
- Reduced fragmentation
RELATED DOCUMENTS
-----------------
Note:93771.1 Introduction to Locally-Managed Tablespaces
Note:103020.1
Migration from Dictionary Managed to Locally Managed
Tablespaces
Note:102339.1 Temporary Segments - What happens when a sort
occurs
Note:1076161.6 Shutdown Normal or Shutdown Immediate hangs
Note
111666.1 Locally Managed Tablespace with Uniform Extent Size Need 64K Per
Datafile
Note 262472.1 10g: BIGFILE Type Tablespaces Versus SMALLFILE
Type
Note 243246.1 10G : SYSAUX Tablespace
-SMON disabling Transaction Recovery, Oracle 8i Concepts Manual,
pgs. 3-7 to 3-9
-Oracle Enterprise Manager, Tuning Pack's TABLESPACE
MAPPING feature
REFERENCES
NOTE:102339.1 - Temporary Segments: What Happens When a Sort
Occurs
NOTE:103020.1 - Migration from Dictionary Managed to Locally Managed
Tablespaces
NOTE:1076161.6 - Shutdown Normal or Shutdown Immediate Hangs.
SMON disabling TX Recovery
NOTE:111666.1 - Locally Managed Tablespace with
Uniform Extent Size Need 64 K Per Datafile
NOTE:262472.1 - 10g: BIGFILE Type
Tablespaces Versus SMALLFILE Type
NOTE:93771.1 - Introduction to
Locally-Managed Tablespaces
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-1070677/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 乾貨分享|優炫資料庫管理之表空間資料庫
- Oracle表空間的管理方式(LMT、DMT)--本地和字典管理Oracle
- 表空間和資料檔案的管理
- openGauss中如何管理表空間
- Oracle OCP(49):表空間管理Oracle
- 16、表空間 建立表空間
- sybase iq表空間管理常用語句
- Linux 磁碟掛載和swap空間管理Linux
- PostgreSQL:表空間-->資料庫-->表SQL資料庫
- oracle建立臨時表空間和資料表空間以及刪除Oracle
- Go的棧空間管理Go
- SYSTEM 表空間管理及備份恢復
- 2.5.3 建立本地管理的SYSTEM表空間
- 達夢資料庫表空間管理方法及實戰演示資料庫
- Oracle臨時表空間檢視、新增臨時表空間資料檔案、修改預設臨時表空間 方法!Oracle
- 2.5.5 使用自動Undo管理: 建立 Undo 表空間
- 達夢表空間管理注意事項總結
- 當使用者無限制使用表空間配額且表空間有足夠空間時出現超出表空間的空間限額
- UNDO表空間空間回收及切換
- 達夢資料庫表空間等空間大小查詢方法總結資料庫
- SciPy 空間資料
- Oracle表空間Oracle
- oracle 表空間Oracle
- PostgreSQL 表空間SQL
- PostgreSQL:表空間SQL
- 硬碟空間的管理和分割槽硬碟
- 智慧辦公~空間管理軟體
- 表空間利用率及表空間的補充
- 深圳眾創空間,資源精細化管理
- [轉帖]達夢資料庫-統計資料表資料量及空間表大小資料庫
- undo表空間容量
- 增加oracle表空間Oracle
- Configure innodb 表空間
- 表空間限額
- 3.2. 表空間
- 只讀表空間
- oracle temp 表空間Oracle
- KingbaseES的表空間
- 2.6.8 設定UNDO空間管理方法