Storage space Management

Source: Internet
Author: User

In the logical structure of a database, table spaces organize different types of data, such as system data, user data, temporary data, rollback data, and so on.
in the same tablespace, the data is organized in a database object , typically one segment for a database object, and a table space with multiple segments.
Stores the data in a database object in a segment, and the storage space occupied by the data is allocated and reclaimed in extents.

A database object occupies a number of extents, so the segment is made up of a number of extents.
When allocating storage space for database objects, one or more extents are allocated at a time.
A zone is the basic unit for allocating and reclaiming storage space, and a zone consists of several contiguous blocks of data.
A data block is the smallest unit of storage in a logical structure and is the basic unit of Oracle's read and write data.

When the user accesses the data, the server process first reads the data from the data block into the database cache and stores it in a buffer that is the same size as the data block, and then reads and writes the data in the buffer.
The data in the database is physically stored on disk and requires a certain operating system block.

A block of data is made up of several operating system blocks, so the size of the data block is an integer multiple of the operating system block.
The database server reads and writes data blocks to read and write to multiple operating system blocks.

Management of segments

In a tablespace, a segment typically represents a database object, and all of the object's data is stored in the corresponding segment.

In general, segments do not need to be created by the user themselves, and segments are automatically generated when database objects are created.
The space allocated for a segment is in a data file in the Tablespace, which consists of several extents.
The relationship between segments, extents, and data blocks.

Type of segment

Oracle 11g supports more than 10 types of segments.

By querying the data dictionary dba_segments, you can get the types of segments that already exist in the current database.

The following is information about the data dictionary dba_segments:

DBA_SEGMENTSDescribes the storage allocated for all segments in the database.

Related View

USER_SEGMENTSDescribes the storage allocated for the segments owned by the current user ' s objects. This view does not display the OWNER ,,, HEADER_FILE HEADER_BLOCK or RELATIVE_FNO columns.

VARCHAR2 (7)

VARCHAR2 (7)

TD class= "Cellalignment28" headers= "d1066160e609 d1066160e190" > TD class= "Cellalignment28" headers= "d1066160e636 d1066160e190" > TD class= "Cellalignment29" headers= "d1066160e726 d1066160e193" > 
Column Datatype NULL Description

OWNER

VARCHAR2(128)

Username of the segment owner

SEGMENT_NAME

VARCHAR2(128)

Name, if any, of the segment

PARTITION_NAME

VARCHAR2(128)

Object Partition Name (Set to for NULL nonpartitioned objects)

SEGMENT_TYPE

VARCHAR2(18)

Type of segment:

  • NESTED Table

  • TABLE

  • TABLE PARTITION

  • CLUSTER

  • lobindex

  • INDEX

  • INDEX PARTITION

  • lobsegment

  • TABLE subpartition

  • INDEX subpartition

  • LOB PARTITION

  • LOB subpartition

  • ROLLBACK

  • TYPE2 UNDO

  • DEFERRED ROLLBACK

  • temporary

  • CACHE

  • SPACE HEADER

  • UNDEFINED

SEGMENT_SUBTYPE

VARCHAR2(10)

Subtype of LOB segment: SECUREFILE ,,, ASSM MSSM andNULL

TABLESPACE_NAME

VARCHAR2(30)

Name of the tablespace containing the segment

HEADER_FILE

NUMBER

ID of the file containing the segment header

HEADER_BLOCK

NUMBER

ID of the block containing the segment header

BYTES

NUMBER

Size, in bytes, of the segment

BLOCKS

NUMBER

Size, in Oracle blocks, of the segment

EXTENTS

NUMBER

Number of extents allocated to the segment

INITIAL_EXTENT

NUMBER

Size in bytes requested for the initial extent of the segment at create time. (Oracle rounds the extent size to multiples of 5 blocks if the requested size is greater than 5 blocks.)

NEXT_EXTENT

NUMBER

Size in bytes of the next extent to being allocated to the segment

MIN_EXTENTS

NUMBER

Minimum number of extents allowed in the segment

MAX_EXTENTS

NUMBER

Maximum number of extents allowed in the segment

MAX_SIZE

NUMBER

Maximum number of blocks allowed in the segment

RETENTION

VARCHAR2(7)

Retention option for SECUREFILE segment

MINRETENTION

NUMBER

Minimum Retention duration for SECUREFILE segment

PCT_INCREASE

NUMBER

Percent by which to increase the size of the next extent to be allocated

FREELISTS

NUMBER

Number of process freelists allocated to this segment

FREELIST_GROUPS

NUMBER

Number of freelist groups allocated to this segment

RELATIVE_FNO

NUMBER

Relative file number of the segment header

Buffer_pool

 

Buffer pool to being used for segment blocks:

  • DEFAULT

  • Code>keep

  • RECYCLE

Flash_cache

 

Database Smart Flash Cache hint to being used for segment blocks:

  • DEFAULT /p>

  • KEEP

  • NONE

Solaris and Oracle Linux func Tionality only.

Cell_flash_cache

VARCHAR2 (7)

 

Cell Flash cache hint to being used for segment blocks:

  • default

  • KEEP

  • NONE

see Als O: oracle Exadata Storage Server Software documentation for more information

INMEMORY

VARCHAR2 (8)

 

Indicates whether the In-memory column store (IM Column Store) is enabled ( enabled ) or Disab LED ( DISABLED ) for this segment

inmemory_priority 1

VARCHAR2 (8)

Indicates the priority for In-memory column store (IM Column Store) Population:

  • Low

  • MEDIUM

  • High

  • CRITICAL

  • NONE

  • NULL

Inmemory_distribute 1

VARCHAR2 ()

 

Indicates how the IM column store was distributed in an Oracle Real application Clusters (Ora CLE RAC) Environment:

  • AUTO

  • by ROWID RANGE

  • by PARTITION

  • by subpartition

inmemory_duplicate 1

VARCHAR2 (+)

 

Indicates the duplicate setting for the IM column store in an Oracle RAC environment:

  • NO DUPLICATE

  • DUPLICATE

  • DUPLICATE all< /code>

INMEMORY_COMPRESSION1

VARCHAR2(17)

Indicates the compression level for the IM column store:

  • NO MEMCOMPRESS

  • FOR DML

  • FOR QUERY [ LOW | HIGH ]

  • FOR CAPACITY [ LOW | HIGH ]

  • NULL

For example:

Storage space Management

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.