Summary of Oracle zone management and segment space management

Source: Internet
Author: User

As a DBA, one of the common scenarios is:

Create a tablespace:

Create tablespace Think
Datafile '/u01/app/Oracle/oradata/orcl/think. dbf' size 100 M
Autoextend on next 10 M maxsize 4096 M
Extent management local uniform size 256 K
Segment space management auto;

Create a user:

Create user bin
Default tablespace Think
Temporary tablespace temp;

Grant permissions:

Grant connect, resource to bin;
Revoke unlimited tablespace from bin;
Alter user bin quota unlimited on Think;

In this scenario, there are two statements:

① Extent management local uniform size 256 K

② Segment space management auto

The former is zone management, and the latter is segment space management.

(I) Zone Management

Zone management is actually the management of tablespaces.

Before 8i, The tablespace is managed in a dictionary. when an object is created or deleted, Oracle's space allocation or recycling is recorded and managed in a data dictionary.

In high-concurrency systems, this will lead to performance degradation, space fragmentation, and other problems

This is already an old technology. I will not go into details here.

Starting from 8i, Oracle introduced local tablespace Management

Adds a bitmap area to the header of the data file in each tablespace.

The first block in the first partition of a segment is the first level bitmap block.

The second block is the second level bitmap block.

The third block is the segment header block.

These two blocks are used to manage free blocks.

Syntax:

Extent management local {autoallocate | uniform size n K/M}

Automatic allocation or uniform size

For automatic allocation, Oracle allocates space according to the incremental algorithm.

If you select a uniform size, you can also specify the size of each interval in detail.

Dba_extents this view shows which objects are allocated with how many intervals

  • 1
  • 2
  • Next Page

Related Article

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.