Oracle local tablespace Management

Source: Internet
Author: User
1. Glossary and Tablespace: Provides the logical structure of the space used by the database. The physical structure is a data file. A Tablespace can contain multiple

1. Glossary and Tablespace: Provides the logical structure of the space used by the database. The physical structure is a data file. A Tablespace can contain multiple

1. Glossary and conventions

Table space: Provides the logical structure of the space used by the database. Its physical structure is a data file. A table space can contain multiple data files.

Local table space management (LMT): a new table space management mode that appears after 8 I. It uses local bitmap to manage the space usage of the table space.

Dictionary-Managed table space (DMT): A table space management mode that can be used before and after 8 I. You can use the data Dictionary to manage the space usage of the table space.

Segment: A logical structure of a database, such as table Segment, index Segment, and rollback Segment. The Segment exists in the tablespace and corresponds to a certain storage space.

Range (Extent): the storage of segments can be divided into one or more intervals, each of which occupies a certain number of data blocks. In the locally managed tablespace, the Extent of the tablespace corresponds to the Extent of the corresponding segment.

Block: The minimum storage unit of the database. In this article, the Block size convention is 8192 bytes.

Bit: the space management unit for local tablespace management,A single digit may be equal to one interval, or multiple digits may form one interval.

2. Local tablespace Management

2.1 syntax

In Oracle8I, Oracle introduced a brand new tablespace management method: localized tablespace management. The so-called localization management means that Oracle no longer uses a data dictionary table to record the usage of the partitions in the Oracle tablespace, but adds a bitmap area to the header of the data file in each tablespace, the usage of each zone is recorded. Whenever a zone is used or released for reuse, Oracle updates this record in the data file header to reflect this change.

The creation process of the tablespace managed locally:

Syntax:Create tablespace name DATAFILE 'data file details' [extent management {LOCAL {AUTOALLOCATE | UNIFORM [size inteter [K | M]}]

The keyword extent management local specifies that this is a LOCAL-managed tablespace. For system tablespace, you can only specify extent mangement local when creating a database because it is the first tablespace created during database creation.

In 8i, dictionary management is the default Management Mode. If the LOCAL keyword is selected, it indicates that this is a locally managed tablespace. Of course, you can continue to choose a more detailed management method: AUTOALLOCATE or UNIFORM .. If AUTOALLOCATE is used, it indicates that Oracle is used to determine the block usage. If UNIFORM is selected, you can specify the size of each block in detail. If not specified, 1 MB is used for each partition.

2.2 advantages of local management

1. The tablespace managed by localization avoids recursive space management operations. This situation often occurs in the tablespace managed by the data dictionary. When the usage of the partition in the tablespace changes, the information of the table in the data dictionary changes, the rollback segments in the system tablespace are also used.

2. The tablespace managed locally avoids the information of idle space and used space written into the corresponding table of the data dictionary. This reduces the competition between the data dictionary tables and improves the concurrency of space management.

3. Zone localization management automatically tracks idle blocks in the tablespace, reducing the need to manually merge free space.

4. The partition size in the tablespace can be determined by the Oracle system, or the database administrator can specify a uniform size to avoid the fragmentation problem of the dictionary tablespace.

5. Change the idle block from the data dictionary management to the header record of the data file to manage the idle block. In this way, rollback information is not generated and the rollback segments in the system tablespace are no longer used. If the data dictionary is used for management, it records the relevant information in the data dictionary table to generate rollback information.

Because of the preceding features of the tablespace, it supports more concurrent operations in a tablespace and reduces the dependency on the data dictionary.

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.