Blocks, segments, and zones in Oracle

Source: Internet
Author: User
Blocks, segments, and zones in Oracle

Oracle tablespaces (tablespace), segments (segment), disk partitions (extent), and blocks are the allocation units used by Oracle to save database objects.

A segment is a database object that consumes storage space, such as tables, indexes, and rollback segments. When you create a table, a table segment is created. When you create a partition table, a segment is created for each partition. When you create an index, an index segment is created, objects that consume storage space are stored in a single segment, including rollback segments, temporary segments, clustering segments, and index segments. A segment can have disks from many inaccessible data files.

The segment itself is composed of one or more disk areas. The Disk Area continuously allocates space in the file. Each segment starts at least one disk area, some objects may need at least two disk zones (such as rollback segments ). Each disk is not necessarily adjacent.

A disk is composed of blocks. A block is the smallest unit for space allocation in Oracle. It is an oracle disk read/write object. The blocks in Oracle usually have three common sizes: 2 K, 4 K, 8 K.

A segment is composed of one or more disk areas, and a disk area is composed of some continuously allocated blocks.

A tablespace is a container that stores segments. Each segment exactly belongs to a tablespace. A tablespace can have multiple segments. All the disk partitions of a given segment are in the tablespace related to the segment.

The level of storage in Oracle is as follows:
1. A database consists of one or more tablespaces.
2. a tablespace consists of one or more data files. A tablespace contains segments.
3. A segment consists of one or more disk partitions. The segments exist in the tablespace, but many data files can exist in the tablespace.
4. The Disk Area is a continuous block group on the disk. A disk area is in a tablespace and is always in a single file in the tablespace.
5. blocks are the smallest allocation units in the database, and blocks are the smallest I/O units used by the database.

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.